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:
@@ -357,7 +357,7 @@ plesk_list_mailboxes() {
|
||||
else
|
||||
# Fallback: scan mailnames directory
|
||||
[ -d "/var/qmail/mailnames/$domain" ] && \
|
||||
ls -1 /var/qmail/mailnames/$domain/ 2>/dev/null
|
||||
ls -1 "/var/qmail/mailnames/$domain/" 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user