Skip to content

Commit

Permalink
Bugfix where parser crashed if description is non-existent
Browse files Browse the repository at this point in the history
  • Loading branch information
topscoder committed May 13, 2024
1 parent d21c652 commit d4d2ddf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/parsers/WordfenceAPIParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def process_item(self, json_object, overwrite, force, overwrite_enhanced):
title = json_object.get('title')
id = json_object.get('id')
description = json_object.get('description')
if description is None:
description = ""

# CVE detection
cve_id = json_object.get('cve')
Expand All @@ -109,7 +111,6 @@ def process_item(self, json_object, overwrite, force, overwrite_enhanced):
if match:
cve_number = match.group(0)
cve_id = cve_number
print("CVE number found:", cve_number)
else:
cve_id = ""

Expand Down

0 comments on commit d4d2ddf

Please sign in to comment.