Skip to content

validate inputs to is_hidden #429

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

validate inputs to is_hidden #429

wants to merge 5 commits into from

Conversation

minrk
Copy link
Member

@minrk minrk commented May 26, 2025

Both path inputs to is_hidden() must be absolute, as is documented. But this wasn't checked, which could lead to incorrect results for invalid inputs. These cases are now ValueErrors instead of undefined behavior.

closes #423

@minrk minrk added the bug label May 26, 2025
minrk added 3 commits May 26, 2025 14:05
inputs must be absolute. Raise ValueError instead of possibly incorrect result when input is invalid
minrk added 2 commits May 26, 2025 14:12
Windows is more complex since it combines root and drive to be absolute

cast to list because parents[-1] is new in 3.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

paths.is_hidden() Reports invalid input as hidden
1 participant