[Webkit-unassigned] [Bug 30996] New: `localStorage.setItem` can overwrite `localStorage` methods
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Nov 1 13:24:07 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=30996
Summary: `localStorage.setItem` can overwrite `localStorage`
methods
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh Intel
OS/Version: Mac OS X 10.6
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: kangax at gmail.com
It's currently possible to overwrite methods of `localStorage` simply by
setting values of same-named keys through `setItem`:
localStorage.setItem('clear', 'x');
localStorage.clear; // "x", not original "clear" method.
This is rather destructive and probably shouldn't happen. Mozilla, for example,
allows to overwrite methods of `localStorage` but only through direct accessors
(localStorage.clear = 'x'). Using getItem/setItem allows to use any key and not
worry about one of them overwriting actual `clearStorage` method.
This still happens in r50383.
Thank you.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list