Closed Bug 2065913 Opened 3 months ago Closed 2 months ago

[wpt-sync] Sync PR 62165 - Cookies: test Path attribute encoding and segment boundary matching

Categories

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

task

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

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

Cookies: test Path attribute encoding and segment boundary matching

A cookie's path is compared against the request URL's path, which is
percent-encoded, and matches only at a path segment boundary.

match-percent-encoded: a byte written literally in a Path attribute does not
match its percent-encoded form in a URL path, and a non-ASCII byte, which makes
the cookie fail to parse, is not reachable at any encoding of it. A service
worker synthesizes a document at whichever path is probed, so paths with no file
behind them can be observed without adding specially named files to the tree.

match-segment-boundaries: a cookie path longer than the request path never
matches, including when it is the request path followed by a slash.

non-ascii-path-attribute: the non-ASCII check applies to the Path attribute that
wins, not to every one seen, matching how the rest of a cookie is validated once
parsing has settled, and such a cookie does not fall back to the default path.

See https://github.com/whatwg/url/issues/814.

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

CI Results

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

Total 5 tests and 7 subtests

Status Summary

Firefox

OK : 3[GitHub] 5[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: 23[GitHub] 40[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]

Chrome

OK : 3
PASS: 23

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/116d1b8f5b4b https://hg.mozilla.org/integration/autoland/rev/0349566e7a9c [wpt PR 62165] - Cookies: test Path attribute encoding and segment boundary matching, a=testonly
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.