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

Realpath() alternative for nonexisting paths #17520

Open
NumbersTada opened this issue Jan 19, 2025 · 1 comment
Open

Realpath() alternative for nonexisting paths #17520

NumbersTada opened this issue Jan 19, 2025 · 1 comment

Comments

@NumbersTada
Copy link

Description

I need to check if the path is valid so it is not pointing to a higher directory than the uploads directory when using my PHP script for uploading files. But I need it to work with non existing paths too. I need something like os.path.normpath() from Python.

@cmb69
Copy link
Member

cmb69 commented Jan 23, 2025

I need something like os.path.normpath() from Python.

It seems to me that this can be written in userland (not particularly difficult), but it would ignore any (sym)links, so it might not be the best idea.

Consider to pursue the RFC process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants