Skip to content

Commit

Permalink
disable case-sensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
fqrious committed Jan 23, 2025
1 parent 02b1c91 commit 67ff46a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vulmatch/server/arango_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,20 +529,20 @@ def get_softwares(self):
)

if value := self.query.get('cpe_match_string'):
bind_vars['cpe_match_string'] = self.like_string(value)
bind_vars['cpe_match_string'] = self.like_string(value).lower()
filters.append(
"FILTER doc.cpe LIKE @cpe_match_string"
)

struct_match = {}
if value := self.query.get('product_type'):
struct_match['part'] = value[0]
struct_match['part'] = value[0].lower()
filters.append('FILTER doc.x_cpe_struct.part == @struct_match.part')


for k in ['product', 'vendor', 'version', 'update', 'edition', 'language', 'sw_edition', 'target_sw', 'target_hw', 'other']:
if v := self.query.get(k):
struct_match[k] = self.like_string(v)
struct_match[k] = self.like_string(v).lower()
filters.append(f'FILTER doc.x_cpe_struct.{k} LIKE @struct_match.{k}')

if struct_match:
Expand Down

0 comments on commit 67ff46a

Please sign in to comment.