Open Bug 2085394 Opened 26 days ago Updated 9 days ago

Cookies without max–age cleared on shutdown even when listed in exceptions

Categories

(Toolkit :: Data Sanitization, defect)

Firefox 158
defect

Tracking

()

People

(Reporter: msau, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:158.0) Gecko/20100101 Firefox/158.0

Steps to reproduce

On Firefox 158.0.1 (64 bits) on Linux Mint with "clear cookies on exit" and an exception on a domain.
I go on a domain in a tab and work.
After closing the tab I see, going in "delete specific data", that there is 7 cookies for the domain.
User agent: Mozilla/5.0 (X11; Linux x86_64; rv:158.0) Gecko/20100101 Firefox/158.0

Actual results

When I restart Firefox only 4 cookies remain for the domain.
This is a recent problem. Considering my update history, I think that version 156 worked (if the domain cookie generation did not change).

Expected results

I expected to retrieve the 7 cookies present before restart.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, but is not confident enough to move the bug to that component.

Component: Untriaged → General
Component: General → Data Sanitization
Product: Firefox → Toolkit

Can you check you have your exceptions in the right list, i.e. consult bug 2065902 for the change in bug 1767271 for v154.0

I don't see what is relevant. I see only one way to set exceptions et it is not all the cookies in the domain that are lost.
Going to the development tools, I thing the lost ones are the cookies tagged as session in expiration date.
These cookies are preserved on restart when I remove the clear on close option and the web site retrieve its datas.
But with clear on close the session cookies are lost and the web site annoyingly have to ask the datas again.

I made further investigations, suppressing cookies and datas using F12 storage tab while.
It is not a problem with session cookies or not only.
Even if I remove all storage, cookies and data visible by F12/storage, the parameters/manage cookies shows remaining cookies not visible on F12/storage cookies. And the web site still works, until I delete them.
I don't know how to see these remaining cookies.

That might be additional types of data besides just cookies, in other storage categories (indexedDB, localStorage etc.) — if you have a reproduction example of an issue that's separate from this shutdown sanitizer exception bug, please file that separately with steps to reproduce, thanks.

The first thing to check is whether "Open previous windows and tabs" is enabled in Home & startup — as without it the session–scoped cookie won't be restored; it only gets added back after "Restore previous session" from History menu as captured in the video above.

(It also shows the detail of the two cookies set, one with and one without expiry.)

I can confirm that when using "Restore previous session" for the expected session cookies retained, using "Clear history when Firefox closes" with exceptions for that site does not keep the session cookie after restarting.

(NB: in the first browser-invoked "Restart" the session cookie is still kept, however after full shutdown and new start only the cookie with expiry is present, and the session one gone.)

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Summary: Exception in clear cookies on exit loose some cookies → Cookies without max–age cleared on shutdown even when listed in exceptions

Yes, I have "Open previous windows and tabs" and "Clear history when Firefox closes".
But I can't tell which cookies are missing, or their type, and if its only cookie because there are cookies that are not visible with F12/storage tool. And I verified that the site still works by removing all cookies storage with F12 tools.
All I can tell is that the number of such hidden cookies for the problematic site lowers after restart and that break the memory.
I remember that, years ago, it was possible with "parameter/privacy and security/clear data for specific sites" to see the detail of the cookies and not only the number per site. Is there an option to recover this possibility and give more clue?

The severity field is not set for this bug.
:momar, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(momar)
Severity: -- → S3
Flags: needinfo?(momar)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: