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

posixpath.realpath(..., strict=True) doesn't limit symlinks #118441

Open
nineteendo opened this issue Apr 30, 2024 · 0 comments
Open

posixpath.realpath(..., strict=True) doesn't limit symlinks #118441

nineteendo opened this issue Apr 30, 2024 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@nineteendo
Copy link
Contributor

nineteendo commented Apr 30, 2024

Bug report

Bug description:

>>> import posixpath
>>> posixpath.realpath("s/" * 33, strict=True)
'/Users/wannes/path-picker/link-test/dirs'

Expected OSError(errno.ELOOP, "Too many symbolic links", path) matching realpath on macOS:

wannes@Stefans-iMac dirs % realpath s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s
realpath: s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s: Too many levels of symbolic links

CPython versions tested on:

3.12

Operating systems tested on:

macOS

@nineteendo nineteendo added the type-bug An unexpected behavior, bug, or error label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant