-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix #76359: open_basedir bypass through adding ".." #7024
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
Conversation
We explicitly forbid adding `..` to `open_basedir`at runtime.
It was actually my intention to target PHP-7.4. |
What is the impl. issue with this? It should be possible to normalize the set value before it is used in the check and then when the fixed value contains |
That would be a behavioral change. As it is, relative paths, and absolute paths containing |
Then simply store the unnormalized path (if check passed of course) :) |
That's what we're doing. But relative paths depend on the CWD, which might change later. |
https://bugs.php.net/bug.php?id=76359 看了一眼居然是三年前就捅出来的问题。。。目前才修复吗 |
We explicitly forbid adding
..
toopen_basedir
at runtime.Note this is only a minimal fix for the reported issue. There are still problems with
..
somewhere in the path, e.g. consider:with index.php:
outputs:
Generally disallowing
..
in the path might by too much of a BC break, though.