Skip to content

Commit

Permalink
ATTACK command call on_detected_attack if queue doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout Feys committed Aug 26, 2024
1 parent 92155c6 commit 4f1920d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion aikido_firewall/background_process/commands/attack.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,11 @@ def process_attack(connection_manager, data, queue):
Adds ATTACK data object to queue
Expected data object : [injection_results, context, blocked_or_not, stacktrace]
"""
queue.put(data)
if queue:
queue.put(data)
else:
connection_manager.on_detected_attack(
attack=data[0], context=data[1], blocked=data[2], stack=data[3]
)
if connection_manager and connection_manager.statistics:
connection_manager.statistics.on_detected_attack(blocked=data[2])

0 comments on commit 4f1920d

Please sign in to comment.