CRITICAL FIX: Guard unprotected header_score comparison at line 1815
Line 1815: Changed from [ "$header_score" -ge 8 ] to [ "${header_score:-0}" -ge 8 ]
- This was another unprotected array variable access in the threat scoring loop
- Missed in previous fix - now ALL array accesses in scoring loop are guarded
This ensures script continues past 'Calculating threat scores...' phase.
This commit is contained in:
@@ -1812,7 +1812,7 @@ calculate_threat_scores() {
|
||||
header_score=${header_anomalies[$ip]:-0}
|
||||
if [ "${header_score:-0}" -ge 12 ]; then
|
||||
score=$((score + 8)) # Multiple header suspicions
|
||||
elif [ "$header_score" -ge 8 ]; then
|
||||
elif [ "${header_score:-0}" -ge 8 ]; then
|
||||
score=$((score + 5)) # Moderate header anomalies
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user