Skip to content

Commit 5bd496e

Browse files
Apply suggestions from code review
1 parent dc5194e commit 5bd496e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aikido_zen/vulnerabilities/path_traversal/unsafe_path_start.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828

2929
def starts_with_unsafe_path(file_path, user_input):
3030
"""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())
31+
path_parsed = ensure_one_leading_slash(file_path.lower())
32+
input_parsed = ensure_one_leading_slash(user_input.lower())
3333

3434
for dangerous_start in dangerous_path_starts:
3535
if path_parsed.startswith(dangerous_start) and path_parsed.startswith(

0 commit comments

Comments
 (0)