-
Notifications
You must be signed in to change notification settings - Fork 7.8k
session_create_id - error message for large prefix #15338
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
session_create_id - error message for large prefix #15338
Conversation
ext/session/session.c
Outdated
/* E_ERROR raised for security reason. */ | ||
php_error_docref(NULL, E_WARNING, "Prefix cannot contain special characters. Only the A-Z, a-z, 0-9, \"-\", and \",\" characters are allowed"); | ||
RETURN_FALSE; |
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.
Hum, the comment is leading me to believe that this should be an exception
5c9e5aa
to
0a2b1a2
Compare
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.
Thank you!
I do wonder if maybe we shouldn't create some ValueError utility functions, as a lot of them have standard messages ("cannot be empty"
, "must be greater than or equal to %d"
, etc.)
Adds exclusive error message for prefixes larger than 256 characters. Currently, it shows the wrong message
Prefix cannot contain special characters. Only the A-Z, a-z, 0-9...
.