WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
34778
Add support to isolate file:/// URIs in their own domain by default
https://bugs.webkit.org/show_bug.cgi?id=34778
Summary
Add support to isolate file:/// URIs in their own domain by default
Chris Evans
Reported
2010-02-09 17:28:37 PST
Chromium will use this new mode by default. Patch forthcoming...
Attachments
Add support for putting file:/// URIs into their own unique domain
(27.50 KB, patch)
2010-02-09 17:42 PST
,
Chris Evans
no flags
Details
Formatted Diff
Diff
Updated so new methods are at bottom of IDL file
(27.35 KB, patch)
2010-02-09 20:24 PST
,
Chris Evans
sam
: review+
commit-queue
: commit-queue-
Details
Formatted Diff
Diff
Trivial merge with Changeset 54587. Ready to go to commit queue again.
(27.32 KB, patch)
2010-02-10 20:24 PST
,
Chris Evans
eric
: review+
commit-queue
: commit-queue-
Details
Formatted Diff
Diff
Export new WebCore function to fix Mac link error
(27.92 KB, patch)
2010-02-16 22:53 PST
,
Chris Evans
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Chris Evans
Comment 1
2010-02-09 17:42:18 PST
Created
attachment 48454
[details]
Add support for putting file:/// URIs into their own unique domain
Chris Evans
Comment 2
2010-02-09 17:43:16 PST
Adam, can you help me land this? It's mostly trivial / tedious wiring. I think I got all the places. Once landed I can get on with the subsequent changes (Chromium wiring and then add the test, which I promise I won't neglect to do :)
Adam Barth
Comment 3
2010-02-09 18:05:51 PST
Kind of ridiculous what it takes to add one bit of state, huh? One minor issue, you need to add new functions at the bottom of the IDL file because of the way virtual functions work in C++. Other than that, looks reasonable. I'm leaving this r? for now in case other folks want to discuss what we're thinking about doing here. We've had some discussion on #webkit in the past, but Chris and my thinking has evolved slightly since then.
Chris Evans
Comment 4
2010-02-09 20:23:56 PST
Assuming your IDL comment refers to IWebPreferencesPrivate.idl -- new patch forthcoming. NOTE - this patch doesn't change the WebKit default behaviour at all. That's left for clients to do if they want additional security for file:/// URIs. Given that this won't affect WebKit clients, but Chromium wants to use this -- I'm in favour of submitting sooner rather than later :)
Chris Evans
Comment 5
2010-02-09 20:24:53 PST
Created
attachment 48459
[details]
Updated so new methods are at bottom of IDL file
Sam Weinig
Comment 6
2010-02-09 22:47:19 PST
Can you explain what issues you are trying to mitigate with this new mode? You say your thinking in this area has changed, what changed your mind?
Adam Barth
Comment 7
2010-02-09 22:55:53 PST
> Can you explain what issues you are trying to mitigate with this new mode?
The risk is that a user might download an HTML document in an email. When they viewed that document, the document would be able to steal any file on the their hard drive.
> You say your thinking in this area has changed, what changed your mind?
A couple things: 1) Chris noticed that he was doing the above a bunch and got scared. 2) He wants to try turning this on in a Chrome Dev channel release (the equivalent of the WebKit nightly builds) to see how the community reacts. My guess is that we'll get a bunch of complaints and will need to back off, but I'm not sure where we'll end up. When we discussed this on #webkit, Maciej suggested some kind of "Developer mode" that would have more permissive file:// URL restrictions. This is all very much open for discussion, but having code seemed like a good way to start the discussion.
Chris Evans
Comment 8
2010-02-10 00:45:59 PST
Regarding 1), the threat I'm worried about is HTML attachments (e.g. repro.html) on bugs in the WebKit and Chromium bug databases. I could feasibly get my files stolen. Not good. I'd rather the browser protected me by default. Regarding 2), I really don't expect much kick back. I have added a Chromium command-line flag override for developers that need communication between local files. 99% of our users likely won't notice or care, and could use the extra protection. Well, there's only one way to find out. If we can get this WebKit patch landed, I'll flip the setting in the next Chromium dev channel build and report back.
Sam Weinig
Comment 9
2010-02-10 10:36:11 PST
Thanks for the explanation.
Sam Weinig
Comment 10
2010-02-10 10:37:38 PST
Comment on
attachment 48459
[details]
Updated so new methods are at bottom of IDL file Please follow this up with a test case.
Chris Evans
Comment 11
2010-02-10 11:47:56 PST
Yep, test is pending. I need to get this landed, then the Chromium changes landed, before I can land the test without breaking anything. Joy of dependencies :)
WebKit Commit Bot
Comment 12
2010-02-10 18:26:26 PST
Comment on
attachment 48459
[details]
Updated so new methods are at bottom of IDL file Rejecting patch 48459 from commit-queue. Failed to run "['/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', '--reviewer', 'Sam Weinig', '--force']" exit_code: 1 Last 500 characters of output: e WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm Hunk #1 succeeded at 329 (offset 5 lines). patching file WebKitTools/DumpRenderTree/LayoutTestController.cpp Hunk #1 succeeded at 928 (offset 19 lines). Hunk #2 succeeded at 1380 (offset 20 lines). patching file WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp patching file WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp patching file WebKitTools/DumpRenderTree/LayoutTestController.h Hunk #1 succeeded at 69 (offset 1 line). Full output:
http://webkit-commit-queue.appspot.com/results/256695
Chris Evans
Comment 13
2010-02-10 19:56:36 PST
Grr! Clashes with Changeset 54587 for trunk/WebCore/page/SecurityOrigin.cpp by Mr. Barth :) Updating patch in progress....
Chris Evans
Comment 14
2010-02-10 20:24:25 PST
Created
attachment 48544
[details]
Trivial merge with Changeset 54587. Ready to go to commit queue again.
Chris Evans
Comment 15
2010-02-10 20:25:40 PST
Adam, Sam or Eric: can you r+, cq? the updated patch? The trivial conflict with SecurityOrigin.cpp has been resolved.
Eric Seidel (no email)
Comment 16
2010-02-11 03:22:49 PST
Comment on
attachment 48544
[details]
Trivial merge with Changeset 54587. Ready to go to commit queue again. The commit-queue spun on this one for a while, making me think there might be something wrong with the patch. I'm going to re-mark this r? so that the EWS bots run on it. If those pass, i'm happy to mark it cq+
Chris Evans
Comment 17
2010-02-11 11:12:53 PST
I'm no expert, but I see green on EWS? :)
Eric Seidel (no email)
Comment 18
2010-02-11 11:22:33 PST
Comment on
attachment 48544
[details]
Trivial merge with Changeset 54587. Ready to go to commit queue again. Yup. lets do this thang.
WebKit Commit Bot
Comment 19
2010-02-11 22:37:44 PST
Comment on
attachment 48544
[details]
Trivial merge with Changeset 54587. Ready to go to commit queue again. Rejecting patch 48544 from commit-queue. Unexpected failure when landing patch! Please file a bug against webkit-patch. Failed to run "['WebKitTools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', 'land-attachment', '--force-clean', '--non-interactive', '--no-update', '--parent-command=commit-queue', '--build-style=both', '--quiet', '48544']" exit_code: 1 Last 500 characters of output: ebkitpy/statusserver.py", line 87, in update_status return NetworkTransaction().run(lambda: self._post_to_server(queue_name, status, patch, results_file)) File "/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/webkitpy/networktransaction.py", line 52, in run self._check_for_timeout() File "/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/webkitpy/networktransaction.py", line 58, in _check_for_timeout raise NetworkTimeout() webkitpy.networktransaction.NetworkTimeout
Chris Evans
Comment 20
2010-02-12 11:46:05 PST
Argh! The latest reject has no "full output" link, so I can't see what might have gone wrong. Looks like a timeout waiting for the network? Can anyone help me land this?
Eric Seidel (no email)
Comment 21
2010-02-12 11:48:06 PST
Yeah, that's what happened last time. The commit-queue hung for hours trying to post the actual output. I'll attempt to land this manually this afternoon. Sorry for the runaround.
Chris Evans
Comment 22
2010-02-12 13:50:56 PST
Thanks, Eric. No need to apologize; there's probably something weird about my patch if this has happened twice?? I can't see anything obviously wrong, though.
Eric Seidel (no email)
Comment 23
2010-02-12 14:36:41 PST
The commit-queue failing to upload the results is a commit queue bug. The actual failure is: Ld /Users/eseidel/Projects/build/Release/WebKit.framework/Versions/A/WebKit normal i386 cd /Users/eseidel/Projects/WebKit/WebKit setenv MACOSX_DEPLOYMENT_TARGET 10.5 /Developer/usr/bin/g++-4.2 -arch i386 -dynamiclib -L/Users/eseidel/Projects/build/Release -F/Users/eseidel/Projects/build/Release -F/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -F/System/Library/Frameworks/Carbon.framework/Frameworks -F/System/Library/Frameworks/Quartz.framework/Frameworks -F/System/Library/PrivateFrameworks -filelist /Users/eseidel/Projects/build/WebKit.build/Release/WebKit.build/Objects-normal/i386/WebKit.LinkFileList -Wl,--no-demangle -exported_symbols_list mac/WebKit.exp -install_name /Users/eseidel/Projects/build/Release/WebKit.framework/Versions/A/WebKit -mmacosx-version-min=10.5 -Wl,-dead_strip -sub_umbrella WebCore -lWebKitSystemInterfaceLeopard -framework Carbon -framework Cocoa -framework JavaScriptCore -licucore -framework OpenGL -framework QuartzCore -framework Security -framework WebCore -Wl,-single_module -compatibility_version 1 -current_version 533.1 -o /Users/eseidel/Projects/build/Release/WebKit.framework/Versions/A/WebKit Undefined symbols: "__ZN7WebCore8Settings30setAllowFileAccessFromFileURLsEb", referenced from: -[WebView(WebPrivate) _preferencesChangedNotification:] in WebView.o ld: symbol(s) not found collect2: ld returned 1 exit status
Chris Evans
Comment 24
2010-02-12 14:56:39 PST
Thanks! Sigh. I'll look at this after the long weekend. Maybe I have a typo. I'm on Chromium Linux so parts of this patch are blind :(
Adam Barth
Comment 25
2010-02-12 21:59:48 PST
You just have to add __ZN7WebCore8Settings30setAllowFileAccessFromFileURLsEb to WebCore.base.exp. Developing WebKit without a Mac is a minefield. :)
Chris Evans
Comment 26
2010-02-16 22:53:38 PST
Created
attachment 48863
[details]
Export new WebCore function to fix Mac link error
Adam Barth
Comment 27
2010-02-16 22:55:12 PST
Comment on
attachment 48863
[details]
Export new WebCore function to fix Mac link error ok, let's give it a spin
WebKit Commit Bot
Comment 28
2010-02-16 23:32:36 PST
Comment on
attachment 48863
[details]
Export new WebCore function to fix Mac link error Clearing flags on attachment: 48863 Committed
r54873
: <
http://trac.webkit.org/changeset/54873
>
WebKit Commit Bot
Comment 29
2010-02-16 23:32:43 PST
All reviewed patches have been landed. Closing bug.
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