diff --git a/modules/security/malware-scanner.sh b/modules/security/malware-scanner.sh index 58d7d99..b351911 100755 --- a/modules/security/malware-scanner.sh +++ b/modules/security/malware-scanner.sh @@ -1599,7 +1599,7 @@ STANDALONE_EOF # Escape special characters for sed (handle /, \, &, |, $) # CRITICAL FIX: Must escape the delimiter (|) as well since we use it in the sed command - local escaped_paths=$(printf '%s\n' "$paths_declaration" | sed -e 's/[\/&|]/\\&/g') + escaped_paths=$(printf '%s\n' "$paths_declaration" | sed -e 's/[\/&|]/\\&/g') if ! sed -i "s|PLACEHOLDER_SCAN_PATHS|$escaped_paths|" "$session_dir/scan.sh"; then echo -e "${RED}ERROR: Failed to generate standalone scanner script${NC}"