Bug 151408

Summary: Web Inspector: Storage tab shouldn't hide cookies for .example.com when inspected page is foo.bar.example.com
Product: WebKit Reporter: Blaze Burg <bburg>
Component: Web InspectorAssignee: Blaze Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: DoNotImportToRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on: 151424    
Bug Blocks:    
Attachments:
Description Flags
Proposed Fix timothy: review+

Blaze Burg
Reported 2015-11-18 14:26:02 PST
The regular expression we use to match resource domains to cookie domains only allows for one subdomain, apparently: static cookieDomainMatchesResourceDomain(cookieDomain, resourceDomain) { if (cookieDomain.charAt(0) !== ".") return resourceDomain === cookieDomain; return !!resourceDomain.match(new RegExp("^([^\\.]+\\.)?" + cookieDomain.substring(1).escapeForRegExp() + "$"), "i"); } See <rdar://problem/23041415>.
Attachments
Proposed Fix (12.84 KB, patch)
2015-11-18 17:58 PST, Blaze Burg
timothy: review+
Blaze Burg
Comment 1 2015-11-18 14:29:29 PST
To test this, we should move the logic into a model class static method. Come to think of it, this code is stupidly structured and blocks live updates by making the view responsible for fetching cookies. But let's take this a step at a time...
Blaze Burg
Comment 2 2015-11-18 17:58:44 PST
Created attachment 265817 [details] Proposed Fix This patch won't apply, as it depends on the other patch that moves the code.
Blaze Burg
Comment 3 2015-11-18 22:30:42 PST
Note You need to log in before you can comment on or make changes to this bug.