siteDataTestUtils.hasCookies() is wrong if the host is a substring of an existing cookies host
Categories
(Toolkit :: Data Sanitization, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: h.sofie.p, Assigned: abhishekmadan, Mentored)
Details
Attachments
(1 file)
I encountered the issue that I set a cookies for "https://1hour10minutes.com" and for "https://10minutes.com", via siteDataTestUtils.addToCookie, and after I removed the cookie for "https://10minutes.com", siteDataTestUtils.hasCookies still stated that there is a cookie for "https://10minutes.com". I am quite sure that this is due to this includes
statement here, "10minutes.com" is included in the string "1hour10minutes.com"
Reporter | ||
Comment 1•2 years ago
|
||
@pbz do you think we could just check for equality of the hosts here or would that be too strict?
Comment 2•2 years ago
|
||
That would be too strict. There may be cookies set for the entire base domain. We could call getCookiesFromHost
instead: https://searchfox.org/mozilla-central/rev/dcf64fc565e3749119bd57202e2ab06533155d16/netwerk/cookie/nsICookieManager.idl#282
Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 5•2 years ago
|
||
bugherder |
Description
•