Bug 197268 - REGRESSION(r230367): a "." is prepended before cookies set without an explicit domain
Summary: REGRESSION(r230367): a "." is prepended before cookies set without an explici...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on: 184334
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-24 18:43 PDT by Devin Rousso
Modified: 2019-05-03 14:59 PDT (History)
9 users (show)

See Also:


Attachments
Patch (9.14 KB, patch)
2019-04-24 18:57 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-04-24 18:43:46 PDT
When setting a cookie without a `domain`, we use the current host as the `domain`, but we also prepend a "." to the host.  RFC 2965 states "If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.", so we should only be adding a leading "." if a `domain` is provided.
Comment 1 Devin Rousso 2019-04-24 18:44:00 PDT
<rdar://problem/49767847>
Comment 2 Devin Rousso 2019-04-24 18:57:31 PDT
Created attachment 368207 [details]
Patch
Comment 3 Alex Christensen 2019-04-25 10:13:21 PDT
Comment on attachment 368207 [details]
Patch

r=me, why don't we have tests for this?
Comment 4 Devin Rousso 2019-05-03 14:32:39 PDT
Comment on attachment 368207 [details]
Patch

There are WPT that cover this.
Comment 5 WebKit Commit Bot 2019-05-03 14:59:14 PDT
Comment on attachment 368207 [details]
Patch

Clearing flags on attachment: 368207

Committed r244924: <https://trac.webkit.org/changeset/244924>
Comment 6 WebKit Commit Bot 2019-05-03 14:59:16 PDT
All reviewed patches have been landed.  Closing bug.