Skip to content

Commit

Permalink
Fix Issue #11
Browse files Browse the repository at this point in the history
Uncontrolled data used in path expression
  • Loading branch information
TheManWhoLikesToCode committed Jan 16, 2024
1 parent ffb92b6 commit 63d7879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ frontend/.env
*.pyc
*.DS_Store
backend/support/.DS_Store
credentials.json
backend/credentials.json
4 changes: 2 additions & 2 deletions backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@


def is_file_valid(file_path):
return os.path.isfile(file_path) and not os.path.islink(file_path)

normalized_path = os.path.normpath(file_path)
return os.path.isfile(normalized_path) and not os.path.islink(normalized_path)

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.

def remove_file_safely(file_path):
try:
Expand Down

0 comments on commit 63d7879

Please sign in to comment.