Fix HIGH priority issues: library exit, unquoted paths, and globs
Fixed multiple HIGH severity issues found by QA scan: 1. Library exit usage (lib/http-attack-analyzer.sh): - Changed exit 1 to return 1 - Libraries should return, not exit (would terminate caller) 2. Unquoted path expansions (9 fixes): - cleanup-toolkit-data.sh: Quoted $pattern in ls/rm commands - hardware-health-check.sh: Quoted /sys/block/$disk/queue paths - plesk-helpers.sh: Quoted /var/qmail/mailnames/$domain path - Prevents breakage with paths containing spaces 3. Unquoted globs in rm commands (3 fixes): - erase-toolkit-traces.sh: Quoted glob patterns - Prevents unintended file deletion from glob expansion All changes improve robustness and prevent edge case failures.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/attack-signatures.sh" 2>/dev/null || {
|
||||
echo "ERROR: attack-signatures.sh not found" >&2
|
||||
exit 1
|
||||
return 1
|
||||
}
|
||||
|
||||
# Analyze a single HTTP request log line
|
||||
|
||||
Reference in New Issue
Block a user