-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Fix #78929: Fix a cookie parsing value. Switch to a php_raw_url_decode() #4989
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 current PR would change the behavior of other input parameters as well; I don't think this is intended. Also, please provide a PHPT test case, if possible. And I would suggest that you rebase onto PHP-7.3 or later (7.2 and older are already out of active support).
Thanks.
Could you please suggest a directory for tests? Is a 'php-src/tests/basic/' directory suitable? |
Switch from cookie parsing function from php_url_decode(***) to php_raw_url_decode(***). Only for parsing value. Move redundant code that doesnt's depend from existence of the value before and after condition. Execution flow wasn't changed. Added comment about RFC. Bug report 78929.
fbcb4ca
to
62595ce
Compare
Yes, I think 'php-src/tests/basic/' is suitable. |
It seems you didn't rebase, but rather merged, so I rebased onto |
All mentioned fixes was implemented. |
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.
Thanks! Patch is fine, but for C89 compatibility, I've moved the declarations upwards (wouldn't be needed for PHP 8 anymore, though), and also removed the comment. I also squashed the commits, and tweaked the commit message (including a reference to the RFC section).
Applied as 79376ab. Thanks again! |
Switch from cookie parsing function from php_url_decode()
to php_raw_url_decode(). Only for parsing value.
Move redundant code that doesn't depend from existence of the value
before and after condition. Execution flow wasn't changed.
Added comment about RFC.
Bug report 78929.
https://bugs.php.net/bug.php?id=78929