Console warnings "Cookie has been rejected because it is already expired."
Categories
(Core :: Networking: Cookies, defect, P3)
Tracking
()
People
(Reporter: iztok.kavkler, Assigned: longsonr)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [necko-triaged])
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Steps to reproduce:
Used standard XSRF token in Spring-Angular application. It deletes cookie XSRF-TOKEN and then re-creates it on every request.
Actual results:
The cookie was deleted and recreated, but for every request there was a warning "Cookie “XSRF-TOKEN” has been rejected because it is already expired." in the console.
Expected results:
There should be no warning since setting expiration time in the past is the standard way to delete cookies.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Setting a component for this issue in order to get the dev team involved.
If you feel it's an incorrect one please feel free to change it to a more appropriate one.
Comment 2•5 years ago
|
||
baku, can you take a look?
Comment 3•5 years ago
|
||
I guess this message is confusing to people: https://stackoverflow.com/questions/65038173/cannot-remove-a-cookie-firefox-rejecting-cookies-from-the-past.
Comment 5•4 years ago
|
||
This behavior occurs when passing a cookie value of null,false, or empty string.
Steps To Reproduce.
<?php
setcookie("test1", "");
?>
Comment 6•4 years ago
|
||
Looks like the logging code added here can simply be removed. If the HTTP spec says that expired cookies shall be deleted and no other browser informs about this normal operation, then why does Firefox pollute the console log here, and then even as a warning? I mean, the message is useless and not applicable when the intention was to delete a cookie. In other words, it's wrong, which is a bug worth fixing. And this one is really trivial.
(Please don't ask me to provide a patch. I already tried to set up a Firefox build environment and failed after many hours. I won't do that again for a 1-minute fix. Lots of people already have the required tools.)
| Assignee | ||
Comment 7•3 years ago
|
||
Updated•3 years ago
|
Comment 9•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Description
•