New issue
Advanced search Search tips

Issue 908364 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 28
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

"Clear and reset" doesn't remove domain cookies correctly

Project Member Reported by dullweber@chromium.org, Nov 26

Issue description

When going to site settings for e.g. http://example.com, cookies that were set for ".example.com" are not removed. 

This is probably caused by OnCookiesReceived in website_preference_bridge.cc.
GURL::IsDomain doesn't handle cookie domains correctly. We should use CanonicalCookie::IsDomainMatch instead.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7106f2d5910d162cb8ff34d741b0f534c92dd6ee

commit 7106f2d5910d162cb8ff34d741b0f534c92dd6ee
Author: Christian Dullweber <dullweber@chromium.org>
Date: Tue Nov 27 20:06:45 2018

Fix deleting cookies from Site Settings

"Clear & reset" used GURL::DomainIs() to check if a cookie belongs
to a specific domain. This doesn't handle cookies that are scoped
to a domain and all subdomains correctly.
E.g. a cookie for ".example.com" would not be removed if "example.com"
is cleared.
This is fixed by using CanonicalCookie::IsDomainMatch() instead,
which correctly determines if a cookie is visible to a domain.

Bug:  908364 
Change-Id: If01fde74845c6c8a547ec86b0a3be8b9076b2d61
Reviewed-on: https://chromium-review.googlesource.com/c/1350634
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611278}
[modify] https://crrev.com/7106f2d5910d162cb8ff34d741b0f534c92dd6ee/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferencesTest.java
[modify] https://crrev.com/7106f2d5910d162cb8ff34d741b0f534c92dd6ee/chrome/browser/android/preferences/website_preference_bridge.cc
[modify] https://crrev.com/7106f2d5910d162cb8ff34d741b0f534c92dd6ee/chrome/test/data/android/cookie.html

Status: Fixed (was: Assigned)

Sign in to add a comment