Skip to content

Commit

Permalink
Merge pull request #13650 from mtruj013/notice-id-bug
Browse files Browse the repository at this point in the history
Check notice id string before calling api
  • Loading branch information
mtruj013 authored Mar 6, 2024
2 parents d56101f + 422b778 commit 5868739
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webapp/security/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ def get_processed_details(notice):


def notice(notice_id):
notice = security_api.get_notice(notice_id)
# Check if notice_id is a valid USN or LSN
if re.fullmatch(r"(USN|LSN|SSN)-\d{1,5}-\d{1,2}", notice_id):
notice = security_api.get_notice(notice_id)
else:
flask.abort(404)

if not notice:
flask.abort(404)
Expand Down

0 comments on commit 5868739

Please sign in to comment.