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

Introduce helpers.canonical_path() #483

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

miurahr
Copy link
Owner

@miurahr miurahr commented Nov 1, 2022

Introduce helpers.canonical_path()

  • Handle '../../' with canonical_path() that handle PurePath object
  • Add helpers.is_relative_to(a, b)
  • Remove resolve() from path checkers
  • Add test cases from aqtinstall project
  • Fix is_valid_path check on windows

Signed-off-by: Hiroshi Miura miurahr@linux.com

- Handle '../../' with canonical_path() that handle PurePath object
- Add helpers.is_relative_to(a, b)
- Remove resolve() from path checkers
- Add test cases from aqtinstall project
- Fix is_valid_path check on Windows
- Rename a bad path test file as test_badfiles.py

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
@miurahr miurahr force-pushed the topic/miurahr/security/get-canonical-path branch from 235a27f to 1a61ba2 Compare November 2, 2022 03:58
@miurahr miurahr added enhancement New feature or request security labels Nov 2, 2022
@miurahr miurahr merged commit 3c3c5c0 into master Nov 2, 2022
@miurahr
Copy link
Owner Author

miurahr commented Nov 4, 2022

Released as v0.20.2

@miurahr miurahr deleted the topic/miurahr/security/get-canonical-path branch January 27, 2024 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant