Fix ESCAPE issues in IP reputation and user manager

- Added -- separator to grep/awk commands in lib/ip-reputation.sh (4 fixes)
- Added -- separator to grep commands in lib/user-manager.sh (2 fixes)
- Prevents filename injection attacks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
cschantz
2026-01-09 16:23:17 -05:00
parent c6d5affbee
commit 630cea7cb7
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -124,8 +124,8 @@ get_cpanel_user_info() {
fi
# Parse cPanel user file
local primary_domain=$(grep "^DNS=" "$user_file" | cut -d= -f2)
local email=$(grep "^CONTACTEMAIL=" "$user_file" | cut -d= -f2)
local primary_domain=$(grep "^DNS=" -- "$user_file" | cut -d= -f2)
local email=$(grep "^CONTACTEMAIL=" -- "$user_file" | cut -d= -f2)
# cPanel doesn't store HOMEDIR in user file - it's always /home/username
local home_dir="/home/${username}"