Skip to content

Commit

Permalink
fixing max score null issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jullrich committed Aug 24, 2024
1 parent 6477dbb commit dca397d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions srv/isc-agent/plugins/tcp/http/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def get_winning_signature(request_attributes: Dict) -> Optional[Signature]:
winning_signature = None
signatures = settings.DATABASE_SESSION.query(Signature).order_by(Signature.max_score.desc()).all()
for signature in signatures:
if signature.max_score is None:
signature.max_score = 10000
if top_score >= signature.max_score:
break
score = get_signature_score(signature.rules, request_attributes)
Expand Down

0 comments on commit dca397d

Please sign in to comment.