Closed Bug 1462402 Opened 2 years ago Closed 2 years ago

nsCookieService::CookieExists fails for cookies with host set to '.cloudaccess.net'

Categories

(Core :: Networking: Cookies, defect, major)

57 Branch
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- wontfix
firefox60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix

People

(Reporter: mikedeboer, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Please try the following in your Browser Console:

```js
Services.cookies.cookieExists({
  host: ".cloudaccess.net",
  path: "/",
  name: "chatlio_uuid--0236b260-ce4c-4963-51c0-62d05ef068b9",
}, {
  appId: 0,
  firstPartyDomain: "",
  inIsolatedMozBrowser: false,
  privateBrowsingId: 0,
  userContextId: 0
});
```

This will throw an error:

[Parent 47542, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80070057: file /Users/mikedeboer/Projects/mozilla-central/netwerk/cookie/nsCookieService.cpp, line 4681

which you'll see is introduced here https://hg.mozilla.org/mozilla-central/annotate/5a87c9d62dc4/netwerk/cookie/nsCookieService.cpp#l4652 by one of the patches in bug 1331680.

Subsequently, `nsCookieService::Add` also fails when fed the following.

```js
Services.cookies.add(".cloudaccess.net", "/", "chatlio_uuid--0236b260-ce4c-4963-51c0-62d05ef068b9", "ae363ef1-6a96-49f9-8032-5891994cad2f", false, false, true, Number.MAX_SAFE_INTEGER, {
  appId: 0,
  firstPartyDomain: "",
  inIsolatedMozBrowser: false,
  privateBrowsingId: 0,
  userContextId: 0
});
```

This is an existing cookie, from a users' session history. It's a shame we only learned this now, but the reality is, I think, that we broke sessionstore for an unknown number of users this way. I hope just a few.

Josh, since Amy doesn't seem to be around at this point, could you take a look or defer to the appropriate person to handle this? Thanks!
Flags: needinfo?(josh)
Bug 1331680 didn't modify the behaviour of GetBaseDomainFromHost in any way. Could you find a regression range for this behaviour change?
Flags: needinfo?(josh) → needinfo?(mdeboer)
for lack of data.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
Flags: needinfo?(mdeboer)
You need to log in before you can comment on or make changes to this bug.