Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix directory traversal bug #537

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Conversation

Pouyanpi
Copy link
Collaborator

@Pouyanpi Pouyanpi commented Jun 4, 2024

Summary

This PR addresses a directory traversal bug in the config file loading process and enhances path security. It resolves #481.

Key Changes

  • Bug Fix: Resolved an issue where relative paths led to incorrect directory traversal during config file loading.

Resolved a bug where relative paths could lead to incorrect directory access in config file loading. Improved path handling by adopting absolute paths, normalizing paths, and ensuring strict directory matching with `os.path.sep`. Upgraded error reporting with `ValueError` for clearer diagnostics.
@Pouyanpi Pouyanpi requested a review from drazvan June 4, 2024 14:14
Copy link
Collaborator

@drazvan drazvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@drazvan drazvan merged commit fa0cdab into develop Jun 4, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI not working - ASGI exception
2 participants