Bug 47730 - Web Inspector: grant access to local storage to web inspector
Summary: Web Inspector: grant access to local storage to web inspector
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-15 11:09 PDT by Pavel Podivilov
Modified: 2010-12-07 08:58 PST (History)
13 users (show)

See Also:


Attachments
Patch. (3.71 KB, patch)
2010-10-15 11:12 PDT, Pavel Podivilov
abarth: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Podivilov 2010-10-15 11:09:45 PDT
In chrome, Web Inspector uses "chrome:" schema which has very limited permissions. However, we want to use localStorage to store front-end settings.
Comment 1 Pavel Podivilov 2010-10-15 11:12:37 PDT
Created attachment 70884 [details]
Patch.
Comment 2 Adam Barth 2010-10-15 11:18:21 PDT
Comment on attachment 70884 [details]
Patch.

These "grant" API are like grenades without a pin.  We shouldn't have them at all.  A better design might be to run the inspector in the "chrome-extension" scheme.  That way it can have its own public key to define who should have access to its local storage.
Comment 3 Early Warning System Bot 2010-10-15 11:27:18 PDT
Attachment 70884 [details] did not build on qt:
Build output: http://queues.webkit.org/results/4419052
Comment 4 Eric Seidel (no email) 2010-10-15 11:40:40 PDT
Attachment 70884 [details] did not build on mac:
Build output: http://queues.webkit.org/results/4470040
Comment 5 Pavel Feldman 2010-10-18 01:57:37 PDT
Comment on attachment 70884 [details]
Patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=70884&action=review

> WebCore/page/SecurityOrigin.h:124
>      bool canAccessDatabase() const { return !isUnique(); }

At some point we might want to use database and filesystem from within inspector. So the right solution is to make inspector non-Unique on all the platforms.
Comment 6 Adam Barth 2010-10-18 02:34:00 PDT
(In reply to comment #5)
> (From update of attachment 70884 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=70884&action=review
> 
> > WebCore/page/SecurityOrigin.h:124
> >      bool canAccessDatabase() const { return !isUnique(); }
> 
> At some point we might want to use database and filesystem from within inspector. So the right solution is to make inspector non-Unique on all the platforms.

Indeed.  However, we shouldn't do that by granting it magical privileges.  Instead, we should use a URL scheme that doesn't impose uniqueness.
Comment 7 Pavel Feldman 2010-10-18 02:36:07 PDT
> Indeed.  However, we shouldn't do that by granting it magical privileges.  Instead, we should use a URL scheme that doesn't impose uniqueness.

+1. That's exactly what I meant in the "non-Unique" part of the comment.