Skip to content

Commit

Permalink
fix: [website]: name of vendors returned by get_vendors are lowercase.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Jul 11, 2024
1 parent a599995 commit 0443b1a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions website/web/views/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def search() -> str | WerkzeugResponse:
)
flash(f"Nothing found in the database for {vulnerability_id}.", "warning")
elif vendor and not product:
if vendor in vulnerabilitylookup.get_vendors():
if vendor.lower() in vulnerabilitylookup.get_vendors():
# Got a vendor, show the proper template.
vendor_products = vulnerabilitylookup.get_vendor_products(vendor)
vendor_vulns = vulnerabilitylookup.get_vendor_vulnerabilities(vendor)
Expand Down Expand Up @@ -177,8 +177,12 @@ def vulnerability_view(vulnerability_id: str) -> str:
# The search query was a vulnerability ID, just display that.
source = vulnerabilitylookup.get_vulnerability_source(vulnerability_id)
linked_vulns = vulnerabilitylookup.get_linked_vulnerabilities(vulnerability_id)
nb_comments = Comment.query.filter(Comment.vulnerability==vulnerability_id).count()
nb_bundles = Bundle.query.filter(Bundle.related_vulnerabilities.contains([vulnerability_id])).count()
nb_comments = Comment.query.filter(
Comment.vulnerability == vulnerability_id
).count()
nb_bundles = Bundle.query.filter(
Bundle.related_vulnerabilities.contains([vulnerability_id])
).count()
return render_template(
"vuln.html",
source=source,
Expand Down

0 comments on commit 0443b1a

Please sign in to comment.