Bug 30421

Summary: Web Inspector: about protocol loads can show up on Cookies list as Local Files
Product: WebKit Reporter: Brian Weinstein <bweinstein>
Component: Web Inspector (Deprecated)Assignee: Brian Weinstein <bweinstein>
Status: RESOLVED FIXED    
Severity: Normal CC: alice.barraclough, aroben, joepeck, rik, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Fix
none
Fix for HTTP + File URLs alice.barraclough: review+, bweinstein: commit-queue-

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]
Fix

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
r=me
Comment 5 Brian Weinstein 2009-10-20 13:59:18 PDT
Landed in http://trac.webkit.org/changeset/49883.