Skip to content

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Feb 19, 2021

Since we do no longer URL decode cookie names[1], we must not URL
encode the session name. We need to prevent broken Set-Cookie headers,
by rejecting names which contain invalid characters.

[1] http://git.php.net/?p=php-src.git;a=commit;h=6559fe912661ca5ce5f0eeeb591d928451428ed0


I should note that according to RFC 6265, section 4.1.1, the cookie-name is supposed to be a token, which excludes more characters than we are checking for.

Also, apparently only having an --EXPECTHEADERS-- section causes the test to be recognized as being borked; thus I added an empty --EXPECT-- section.

Since we do no longer URL decode cookie names[1], we must not URL
encode the session name.  We need to prevent broken Set-Cookie headers,
by rejecting names which contain invalid characters.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=6559fe912661ca5ce5f0eeeb591d928451428ed0>
@cmb69 cmb69 added the Bug label Feb 19, 2021
Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems in line with how we treat cookie names elsewhere.

@php-pulls php-pulls closed this in d7c98ca Feb 22, 2021
@cmb69 cmb69 deleted the cmb/80774 branch February 22, 2021 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants