WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 60066
[chromium] Go through WebPermissionClient for local storage access. Also cleanup left over code from previous WebPermissionClient change.
https://bugs.webkit.org/show_bug.cgi?id=60066
Summary
[chromium] Go through WebPermissionClient for local storage access. Also cle...
John Abd-El-Malek
Reported
2011-05-03 14:44:49 PDT
[chromium] Go through WebPermissionClient for local storage access. Also cleanup left over code from previous WebPermissionClient change.
Attachments
Patch
(8.63 KB, patch)
2011-05-03 14:49 PDT
,
John Abd-El-Malek
no flags
Details
Formatted Diff
Diff
Patch
(9.58 KB, patch)
2011-05-03 18:04 PDT
,
John Abd-El-Malek
no flags
Details
Formatted Diff
Diff
Patch
(9.39 KB, patch)
2011-05-03 18:52 PDT
,
John Abd-El-Malek
no flags
Details
Formatted Diff
Diff
Patch
(9.39 KB, patch)
2011-05-03 19:03 PDT
,
John Abd-El-Malek
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
John Abd-El-Malek
Comment 1
2011-05-03 14:49:37 PDT
Created
attachment 92137
[details]
Patch
John Abd-El-Malek
Comment 2
2011-05-03 14:53:06 PDT
ccing Darin since it's WebKit API, although I don't think we need to wait for his ok for this since it's just adding a similar function to an API he just reviewed.
John Abd-El-Malek
Comment 3
2011-05-03 14:54:09 PDT
chrome side change:
http://codereview.chromium.org/6915017/
James Robinson
Comment 4
2011-05-03 15:07:03 PDT
Comment on
attachment 92137
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=92137&action=review
> Source/WebKit/chromium/public/WebPermissionClient.h:49 > + virtual bool allowLocalStorage(WebFrame*, const WebURL&) { return true; }
the URL can be generated from the WebFrame, so it's redundant here
> Source/WebKit/chromium/src/StorageAreaProxy.cpp:89 > + if (webView->permissionClient() > + && !webView->permissionClient()->allowLocalStorage(webFrame, url)) {
nit: don't line wrap this
James Robinson
Comment 5
2011-05-03 16:20:46 PDT
Comment on
attachment 92137
[details]
Patch According to Dr Barth the allowLocalStorage() implementation should be using securityOrigin() and not URL. There are case where the two can differ and we definitely don't want to let a page get around the user's local storage settings by faking out the url.
John Abd-El-Malek
Comment 6
2011-05-03 16:28:43 PDT
(In reply to
comment #5
)
> (From update of
attachment 92137
[details]
) > According to Dr Barth the allowLocalStorage() implementation should be using securityOrigin() and not URL. There are case where the two can differ and we definitely don't want to let a page get around the user's local storage settings by faking out the url.
So the old code was calling frame->document()->url(), hence why I moved it to do the same. Does securityOrigin() return the whole url, or only scheme+host+port? If it's the latter, then that wouldn't work if the user has a content setting for a url that has path for example.
John Abd-El-Malek
Comment 7
2011-05-03 18:04:33 PDT
Created
attachment 92179
[details]
Patch
Adam Barth
Comment 8
2011-05-03 18:12:35 PDT
> So the old code was calling frame->document()->url(), hence why I moved it to do the same. Does securityOrigin() return the whole url, or only scheme+host+port? If it's the latter, then that wouldn't work if the user has a content setting for a url that has path for example.
Security restrictions at a finer granularity than a scheme+host+port don't work.
John Abd-El-Malek
Comment 9
2011-05-03 18:33:57 PDT
ok so I tried to set content settings policies for a url with a path, and that didn't work. so it looks like it's just for hostnames then, in which case using securityOrigin should be fine. however, that should be done in a separate cl, in case that has any side-effects. this change has others that depend on it, and once they're committed, reverting this won't be possible without reverting the chorme side.
James Robinson
Comment 10
2011-05-03 18:43:28 PDT
Comment on
attachment 92179
[details]
Patch R=me. I agree that changing the url/securityOrigin behavior should be a separate patch.
John Abd-El-Malek
Comment 11
2011-05-03 18:52:36 PDT
Created
attachment 92182
[details]
Patch
John Abd-El-Malek
Comment 12
2011-05-03 18:53:39 PDT
I filed
bug 60108
for the url issue. i updated the patch to include the chromium revision with the chrome side change.
John Abd-El-Malek
Comment 13
2011-05-03 19:03:35 PDT
Created
attachment 92184
[details]
Patch
John Abd-El-Malek
Comment 14
2011-05-03 19:09:09 PDT
Committed
r85703
: <
http://trac.webkit.org/changeset/85703
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug