Session store can't restore session-only storage correctly.
Categories
(Firefox :: Session Restore, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fix-optional |
People
(Reporter: xeonchen, Assigned: farre)
References
Details
In [1] it passes nullptr
to create session storage, which was retrieved in [2].
More precisely, it can't restore windows which have session-only storage [3].
If you duplicate tab A to tab B, where A doesn't have storage access (or is being partitioned), then the session-only session storage in A will be restored to B as non-session-only session storage, and that can't be accessed by the web content.
[1] https://searchfox.org/mozilla-central/rev/7fd1c1c34923ece7ad8c822bee062dd0491d64dc/toolkit/components/sessionstore/SessionStoreUtils.cpp#1232
[2] https://searchfox.org/mozilla-central/rev/7fd1c1c34923ece7ad8c822bee062dd0491d64dc/toolkit/components/sessionstore/SessionStoreUtils.cpp#1119
[3] https://searchfox.org/mozilla-central/rev/7fd1c1c34923ece7ad8c822bee062dd0491d64dc/dom/storage/Storage.cpp#46
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•5 years ago
|
||
I've discussed this bug with Gary.
Summarize what I know:
[First of all]
This is not a regression. It is a feature that we don't have in the current 'sessionRestore' implementation.
[Current Situation]
'sessionRestore' doesn't care about StorageAccess when doing collect() from current sessionStorage.
Then 'sessionRestore' cannot set the same StorageAccess of sessionStorage as what we suppose to restore.
When enabling Dynamic First-Party Isolation(Bug 1628486), we will meet the storage access problem in some situations (as comment 1).
[How to correct the behavior]
When doing storage.collect() from sessionStorage, 'session restore' need to collect the storageAccess as well. If we know the storageAccess, we can set the right storageAccess when creating sessionStorage in storage.restore().
Reporter | ||
Comment 2•5 years ago
|
||
Besides the correctness of mIsSessionOnly
, my another concern would be the client code of Storage::GetParentObject, but I haven't found any tests related to it.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Quote the offline chat with Ethan, who is managing the Dynamic FPI project -
"Regarding bug 1634734, the problem only affects session cookies of 3rd-party non-tracker iframes during session restore, which is quite an edge case. I would say it's not urgent at all. maybe severity could be S4."
Assignee | ||
Comment 4•4 years ago
|
||
This is going to get fixed (as a side-effect) by fixing bug 1710004.
Assignee | ||
Updated•4 years ago
|
Description
•