-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[BrowserKit] ignore invalid cookies expires date format #21462
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
xabbuh
commented
Jan 30, 2017
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 |
This looks weird to me. The issue says to ignore the cookie, not to ignore only its date |
Not sure what you mean. The issue description contains this quote from the RFC:
Maybe I misinterpret that part, but IIUC |
ah sorry, I misread it |
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.
I guess we should also update the constructor of this class, where you can find:
if (null !== $expires) {
$timestampAsDateTime = \DateTime::createFromFormat('U', $expires);
if (false === $timestampAsDateTime) {
throw new \UnexpectedValueException(sprintf('The cookie expiration time "%s" is not valid.', $expires));
}
$this->expires = $timestampAsDateTime->format('U');
}
@javiereguiluz I don't think so. Let me quote myself from #15656 (comment):
The constructor will be used by some code that already had to parse the |
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 @xabbuh. |
…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