We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc5194e commit 5bd496eCopy full SHA for 5bd496e
aikido_zen/vulnerabilities/path_traversal/unsafe_path_start.py
@@ -28,8 +28,8 @@
28
29
def starts_with_unsafe_path(file_path, user_input):
30
"""Check if the file path starts with any dangerous paths and the user input."""
31
- path_parsed = trim_leading_slashes(file_path.lower())
32
- input_parsed = trim_leading_slashes(user_input.lower())
+ path_parsed = ensure_one_leading_slash(file_path.lower())
+ input_parsed = ensure_one_leading_slash(user_input.lower())
33
34
for dangerous_start in dangerous_path_starts:
35
if path_parsed.startswith(dangerous_start) and path_parsed.startswith(
0 commit comments