RESOLVED FIXED 151408
Web Inspector: Storage tab shouldn't hide cookies for .example.com when inspected page is foo.bar.example.com
https://bugs.webkit.org/show_bug.cgi?id=151408
Summary Web Inspector: Storage tab shouldn't hide cookies for .example.com when inspe...
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.