mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
Improved import-file url regex
sed doesn't remove ALL whitespace, only newlines. It's better to stop at the first whitespace than to stop at a particular, maybe-not-last query string parameter.
This commit is contained in:
@@ -232,7 +232,7 @@ function import_file() {
|
|||||||
log "Exit Code: $exit_code"
|
log "Exit Code: $exit_code"
|
||||||
|
|
||||||
if [[ exit_code -eq 0 ]]; then
|
if [[ exit_code -eq 0 ]]; then
|
||||||
url=$(echo "$response" | sed ':a;N;$!ba;s/\n//g' | grep -E -o "https://\S*&z=UTC")
|
url=$(echo "$response" | sed ':a;N;$!ba;s/\n//g' | grep -E -o "https://\S*")
|
||||||
$(echo "$url" > "${SOC_PIPE}")
|
$(echo "$url" > "${SOC_PIPE}")
|
||||||
else
|
else
|
||||||
log "false"
|
log "false"
|
||||||
|
|||||||
Reference in New Issue
Block a user