Bug 30421 - Web Inspector: about protocol loads can show up on Cookies list as Local Files
Summary: Web Inspector: about protocol loads can show up on Cookies list as Local Files
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brian Weinstein
Depends on:
Reported: 2009-10-15 20:07 PDT by Brian Weinstein
Modified: 2009-10-20 13:59 PDT (History)
5 users (show)

See Also:

Fix (2.19 KB, patch)
2009-10-15 20:50 PDT, Brian Weinstein
no flags Details | Formatted Diff | Diff
Fix for HTTP + File URLs (2.30 KB, patch)
2009-10-16 10:42 PDT, Brian Weinstein
alice.barraclough: review+
bweinstein: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Weinstein 2009-10-15 20:07:00 PDT
Go to www.google.com, you will see a Local Files entry on the Cookies list of the Web Inspector that has all the same Cookies as Google.

Google creates an about:blank in generating their page, and that is being added to the Cookies domain list, when we should only be adding resources that were loaded from HTTP protocols.
Comment 1 Brian Weinstein 2009-10-15 20:50:07 PDT
Created attachment 41261 [details]

I am not sure if file URLs can create cookies/should show up in the Cookies list, if they should, then the if statement should be changed to:

if (protocolInHTTPFamily() || protocolIs("file")), but I'm not sure which of these is correct, this patch works, but will not show cookies from a file URL, I'm not sure if that is correct behavior or not.
Comment 2 Brian Weinstein 2009-10-16 10:24:16 PDT
Dan Bernstein sent me a test case that shows that cookies are allowed on file URLs, so it seems that this bug was mistitled, and the code check is doing the wrong thing, we should also support file:// loads to show the cookies from.
Comment 3 Brian Weinstein 2009-10-16 10:42:24 PDT
Created attachment 41295 [details]
Fix for HTTP + File URLs
Comment 4 Alice Liu 2009-10-19 12:29:27 PDT
Comment 5 Brian Weinstein 2009-10-20 13:59:18 PDT
Landed in http://trac.webkit.org/changeset/49883.