Closed Bug 2065931 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62167 - Cookies: test that "__Host-" requires an explicit Path attribute

Categories

(Core :: Networking: Cookies, task, P4)

task

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: wpt-sync, Assigned: baku)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 62167 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/62167
Details from upstream follow.

Anne van Kesteren <annevk@annevk.nl> wrote:

Cookies: test that "__Host-" requires an explicit Path attribute

A "__Host-" prefixed cookie has to have been set with a Path attribute whose
value is "/". Ending up with a path of "/" is not enough: a cookie set without a
Path attribute from a URL whose path has a single segment gets a default path of
"/" as well, and has to be rejected all the same.

Reaching that case needs a document whose URL has a single path segment, so that
its default cookie path is "/". "/" itself is the only such URL that wptserve does
not redirect, and a document there is same-origin, so cookies can be set and read
through it.

Component: web-platform-tests → Networking: Cookies
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 12 tests and 35 subtests

Status Summary

Firefox

OK : 1[GitHub] 12[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 2[GitHub] 185[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 3

Chrome

OK : 1
PASS: 5

Safari

OK : 1
PASS: 2
FAIL: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /cookies/prefix/__host.explicit-path.https.window.html [wpt.fyi]
    • "__Host-" without a Path attribute is not set: FAIL (Chrome: PASS, Safari: FAIL)
    • "__Host-" with an empty Path attribute is not set: FAIL (Chrome: PASS, Safari: FAIL)
    • "__Host-" with a valueless Path attribute is not set: FAIL (Chrome: PASS, Safari: FAIL)
Assignee: wptsync → amarchesini
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
You need to log in before you can comment on or make changes to this bug.