Handle ill-formed keys in local storage
Categories
(Core :: Storage: localStorage & sessionStorage, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | affected |
People
(Reporter: jari, Assigned: jari)
References
(Depends on 1 open bug)
Details
Attachments
(1 obsolete file)
Local storage keys which are ill-formed as Unicode strings, such as String.fromCharCode(0xdbff)
, are currently prone to corruption which in turn may lead to spurious collisions or data recovery errors.
To prevent this, error handling or the domain of supported byte sequences should be extended to cover these cases.
Assignee | ||
Comment 1•3 years ago
|
||
Comment 3•3 years ago
•
|
||
Backed out for causing failures at test_brokenUTF-16.html.
Backout link: https://hg.mozilla.org/integration/autoland/rev/08536310d5f48d71f001eecdbf4676869d257997
Failure log:
https://treeherder.mozilla.org/logviewer?job_id=367214509&repo=autoland&lineNumber=6859
https://treeherder.mozilla.org/logviewer?job_id=367215109&repo=autoland&lineNumber=12765
Assignee | ||
Comment 4•3 years ago
|
||
The failure was due to a mochitest checking what happens when invalid unicode is used as a key - and this behavior was specifically changed by this bug.
The failing test case slipped through unnoticed among unrelated intermittent failures sometimes occurring at CI.
The patch now updates the test case to work with the new behavior.
Comment 6•3 years ago
|
||
Backed out for causing failures at storage_setitem.window.html.
Backout link: https://hg.mozilla.org/integration/autoland/rev/06c29d2388a78a84b0b4a4b65785fb2b4d89f426
Failure log: https://treeherder.mozilla.org/logviewer?job_id=367817021&repo=autoland&lineNumber=78124
Comment 7•3 years ago
|
||
It seems, we shouldn't do this after all.
Assignee | ||
Comment 8•3 years ago
|
||
(In reply to Jan Varga [:janv] from comment #7)
It seems, we shouldn't do this after all.
Agreed, at the end, it might be better to fix the underlying issue. The circumstances where it manifests are probably less common than the cases where the proposed fix would throw an error.
Comment 9•3 years ago
|
||
For posterity, the WPT that did exist is https://searchfox.org/mozilla-central/source/testing/web-platform/tests/webstorage/storage_setitem.window.js
Comment 10•3 years ago
|
||
Ok, can we mark this as WONTFIX ?
Updated•3 years ago
|
Comment 11•3 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:jjalkanen, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 12•3 years ago
|
||
(In reply to Release mgmt bot [:marco/ :calixte] from comment #11)
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
Changes planned.
Assignee | ||
Comment 13•2 years ago
|
||
As discussed above, this is currently not needed.
Updated•2 years ago
|
Description
•