Skip to content

Commit

Permalink
Fix ReDoS found by code scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
gcoxmoz committed Dec 7, 2023
1 parent 2273f8c commit bfe31e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slapaclsuite/yaml_input_validator/scripting.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _validate_path(self, value_in, verbose=False):
raise ValueError(f'{where_am_i} must be a list.')
else:
for item in value_in:
if not isinstance(item, str) or not re.match(r'^/(?:[^\/\0]+\/*)*$', item):
if not isinstance(item, str) or not re.match(r'^/[^\0]*$', item):
raise ValueError(f'{where_am_i} "{item}" must be a path element.')
value_out = value_in
return value_out
Expand Down

0 comments on commit bfe31e7

Please sign in to comment.