Open Bug 1747102 Opened 1 year ago Updated 1 year ago

Handle ill-formed keys in local storage

Categories

(Core :: Storage: localStorage & sessionStorage, defect, P3)

Firefox 97
defect

Tracking

()

REOPENED
Tracking Status
firefox97 --- affected

People

(Reporter: jjalkanen, Assigned: jjalkanen)

References

(Depends on 1 open bug)

Details

Attachments

(1 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.

Pushed by jjalkanen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/60f55a6084f7
Handle ill-formed local storage keys. r=dom-storage-reviewers,asuth
See Also: → 1754845

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.

Flags: needinfo?(jjalkanen)
Pushed by jjalkanen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4ed5964d2cec
Handle ill-formed local storage keys. r=dom-storage-reviewers,asuth

It seems, we shouldn't do this after all.

(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.

Flags: needinfo?(jjalkanen)

Ok, can we mark this as WONTFIX ?

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

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.

Flags: needinfo?(jjalkanen)
Flags: needinfo?(bugmail)

(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.

Flags: needinfo?(jjalkanen)
Flags: needinfo?(bugmail)
Depends on: 1748260
You need to log in before you can comment on or make changes to this bug.