8000 [BrowserKit] Invalid Expires attribute should be ignored silently. · Issue #15656 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[BrowserKit] Invalid Expires attribute should be ignored silently. #15656

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

Closed
Naktibalda opened this issue Aug 30, 2015 · 1 comment
Closed

[BrowserKit] Invalid Expires attribute should be ignored silently. #15656

Naktibalda opened this issue Aug 30, 2015 · 1 comment

Comments

@Naktibalda
Copy link
Contributor

BrowserKit Cookie class throws an UnexpectedValueException if Expires attribute contains invalid value, but RFC 6265 states that "If the attribute-value failed to parse as a cookie date, ignore the cookie-av."

@xabbuh
Copy link
Member
xabbuh commented Jan 30, 2017

Actually, after thinking of this again I do not think that we need to change the constructor. It is documented that the expected value must be a string containing the expires timestamp. However, we indeed need to ignore invalid date formats when we are parsing a Set-Cookie header (i.e. inside the fromString() method). See #21462 for a fix.

fabpot added a commit that referenced this issue Jan 30, 2017
…abbuh)

This PR was merged into the 2.7 branch.

Discussion
----------

[BrowserKit] ignore invalid cookies expires date format

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15656
| License       | MIT
| Doc PR        |

Commits
-------

f19788d ignore invalid cookies expires date format
@fabpot fabpot closed this as completed Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
0