-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Check session_create_id() input for null byte #14728
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is sensible, the current implementation can be improved to take care of the issue better.
3841447
to
844856c
Compare
I'd like to see a test where you use |
@Girgias, I want to cover it in the next PRs. Function |
The function
session_create_id()
allows only selected characters amongst which there is no NULL byte, however the validation doesn't check for it.This PR checks for a NULL byte in the function
php_session_valid_key
used by the PHP functionsession_create_id()
.