[Webkit-unassigned] [Bug 207545] New: Blocking Access to LocalStorage and SessionStorage for specific web-sites or for all websites doesn't work 100% of the time
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 11 06:44:49 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=207545
Bug ID: 207545
Summary: Blocking Access to LocalStorage and SessionStorage for
specific web-sites or for all websites doesn't work
100% of the time
Product: WebKit
Version: WebKit Nightly Build
Hardware: iPhone / iPad
OS: All
Status: NEW
Severity: Enhancement
Priority: P2
Component: WebKit API
Assignee: webkit-unassigned at lists.webkit.org
Reporter: bthomas at brave.com
In order to block LocalStorage access or SessionStorage, developers need to inject some Javascript like like:
```
var localStorage = Object.getOwnPropertyDescriptor(window, 'localStorage');
if (localStorage) {
Object.defineProperty(window, 'localStorage', {
get: function() {
console.error("Local Storage Blocked")
return null;
},
});
}
var sessionStorage = Object.getOwnPropertyDescriptor(window, 'sessionStorage');
if (sessionStorage) {
Object.defineProperty(window, 'sessionStorage', {
get: function() {
console.error("Session Storage Blocked")
return null;
},
});
}
```
There should be a simpler way to deny a website or anything access to the storage. Currently, there is none.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200211/ad8b2230/attachment.htm>
More information about the webkit-unassigned
mailing list