Closed Bug 1808345 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 37739 - [Cookies] Update WPTs to set cookies with CTRL chars via HTTP

Categories

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

task

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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

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

Andrew Williams <awillia@chromium.org> wrote:

[Cookies] Update WPTs to set cookies with CTRL chars via HTTP

Updates some existing WPTs that test handling of control characters
so that they set cookies via HTTP headers in addition to setting
cookies via document.cookie. This is useful since the handling
of control characters differs slightly between the two in Chrome.

Note that I only updated the tests that add control characters
into the cookie name and values. I tried adding HTTP equivalents
to the tests in cookies/attributes/attributes-ctl.sub.html, but
with the combinations of attributes tested the time needed to
complete that test increased from a few seconds to over 2 minutes,
and the results were not different than what was shown by the
name and value tests (for Chrome at least).

This CL also:

  • Updates httpCookieTest so that the HTTP Fetch failing can be
    treated as expected. This is useful because Chrome fails to
    load any HTTP request containing a NULL character, which is
    one of the special characters we test for.
  • Replaces the TestExpectation file entries with '-expected' files
  • Simplifies cookies/attributes/attributes-ctl.sub.html

Bug: 1233602
Change-Id: I4a5be65c5cbe5ee97b47e67d49d6e87509ac4c74
Reviewed-on: https://chromium-review.googlesource.com/4128839
WPT-Export-Revision: 59aeaf30866d242ffc5c8387a2a366a4d3f0d7a2

Component: web-platform-tests → Networking: Cookies
Product: Testing → Core
Attached file Notable wpt changes (deleted) —
# CI Results Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI Total 14 tests and 28 subtests ## Status Summary ### Firefox `OK` : 14 `PASS`: 187[GitHub] 198[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] `FAIL`: 559[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] 570[GitHub] ### Chrome `OK` : 14 `PASS`: 705 `FAIL`: 52 ### Safari `OK` : 14 `PASS`: 322 `FAIL`: 435 ## Links [Gecko CI (Treeherder)](https://treeherder.mozilla.org/#/jobs?repo=try&revision=ec3986d2d6b336ce8f6e52f7ef74954bb286373e) [GitHub PR Head](https://wpt.fyi/results/?sha=0ec439d4124f7649fbb7f2272ad2f4c28c6b05b7&label=pr_head) [GitHub PR Base](https://wpt.fyi/results/?sha=0ec439d4124f7649fbb7f2272ad2f4c28c6b05b7&label=pr_base) ## Details ### Firefox-only Failures * [/cookies/attributes/attributes-ctl.sub.html](https://wpt.live/cookies/attributes/attributes-ctl.sub.html) [[wpt.fyi](https://wpt.fyi/results/cookies/attributes/attributes-ctl.sub.html)] * Cookie with %x0 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x0 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x1 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x1 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x1 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x2 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x2 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x2 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x3 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x3 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x3 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x4 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x4 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x4 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x5 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x5 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x5 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x6 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x6 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x6 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x7 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x7 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x7 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x8 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x8 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x8 after Secure attribute is handled correctly.: `FAIL` * Cookie with %xb in Domain attribute value is handled correctly.: `FAIL` * Cookie with %xb in Path attribute value is handled correctly.: `FAIL` * Cookie with %xb after Secure attribute is handled correctly.: `FAIL` * Cookie with %xc in Domain attribute value is handled correctly.: `FAIL` * Cookie with %xc in Path attribute value is handled correctly.: `FAIL` * Cookie with %xc after Secure attribute is handled correctly.: `FAIL` * Cookie with %xe in Domain attribute value is handled correctly.: `FAIL` * Cookie with %xe in Path attribute value is handled correctly.: `FAIL` * Cookie with %xe after Secure attribute is handled correctly.: `FAIL` * Cookie with %xf in Domain attribute value is handled correctly.: `FAIL` * Cookie with %xf in Path attribute value is handled correctly.: `FAIL` * Cookie with %xf after Secure attribute is handled correctly.: `FAIL` * Cookie with %x10 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x10 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x10 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x11 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x11 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x11 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x12 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x12 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x12 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x13 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x13 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x13 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x14 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x14 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x14 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x15 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x15 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x15 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x16 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x16 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x16 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x17 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x17 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x17 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x18 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x18 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x18 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x19 in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x19 in Path attribute value is handled correctly.: `FAIL` * Cookie with %x19 after Secure attribute is handled correctly.: `FAIL` * Cookie with %x1a in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x1a in Path attribute value is handled correctly.: `FAIL` * Cookie with %x1a after Secure attribute is handled correctly.: `FAIL` * Cookie with %x1b in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x1b in Path attribute value is handled correctly.: `FAIL` * Cookie with %x1b after Secure attribute is handled correctly.: `FAIL` * Cookie with %x1c in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x1c in Path attribute value is handled correctly.: `FAIL` * Cookie with %x1c after Secure attribute is handled correctly.: `FAIL` * Cookie with %x1d in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x1d in Path attribute value is handled correctly.: `FAIL` * Cookie with %x1d after Secure attribute is handled correctly.: `FAIL` * Cookie with %x1e in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x1e in Path attribute value is handled correctly.: `FAIL` * Cookie with %x1e after Secure attribute is handled correctly.: `FAIL` * Cookie with %x1f in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x1f in Path attribute value is handled correctly.: `FAIL` * Cookie with %x1f after Secure attribute is handled correctly.: `FAIL` * Cookie with %x7f in Domain attribute value is handled correctly.: `FAIL` * Cookie with %x7f in Path attribute value is handled correctly.: `FAIL` * Cookie with %x7f after Secure attribute is handled correctly.: `FAIL` * [/cookies/attributes/invalid.html](https://wpt.live/cookies/attributes/invalid.html) [[wpt.fyi](https://wpt.fyi/results/cookies/attributes/invalid.html)] * Ignore `Set-Cookie: =`: `FAIL` * Ignore empty cookie string: `FAIL` * Ignore cookie with domain that won't domain match (along with other invalid noise): `FAIL` * [/cookies/attributes/max-age.html](https://wpt.live/cookies/attributes/max-age.html) [[wpt.fyi](https://wpt.fyi/results/cookies/attributes/max-age.html)] * Ignore max-age attribute with invalid non-zero-digit (containing a comma): `FAIL` * Set cookie with age: `FAIL` * Set no cookie with max-age=0: `FAIL` * Set no cookie with max-age=-1: `FAIL` * Set no cookie with max-age=-20: `FAIL` * Set multiple cookies with max-age attribute: `FAIL` * Expire later cookie with same name and max-age=0: `FAIL` * Expire later cookie with same name and max-age=0, and don't set cookie with max-age=0: `FAIL` * Don't set multiple cookies with max-age=0: `FAIL` * [/cookies/attributes/path-redirect.html](https://wpt.live/cookies/attributes/path-redirect.html) [[wpt.fyi](https://wpt.fyi/results/cookies/attributes/path-redirect.html)] * Cookie sent for redirected path with trailing '/' and the redirected URL is one level deeper: `FAIL` * Cookie sent for redirected path match with a trailing ';' after an unquoted Path: `FAIL` * No cookie sent for redirected path match with a trailing ';' inside a quoted Path: `FAIL` * No cookie sent for redirected path match with partially URL encoded path: `FAIL` * Multiple cookies sent for multiple redirected path matches, sorted by length: `FAIL` * No cookie sent for redirected path mismatch where path and redirected URL begin with same string: `FAIL` * No cookie sent for redirected path mismatch where final path directory component and redirected URL resource begin with same string: `FAIL` * No cookie sent for redirected path mismatch where final path directory component begins with same string as redirected URL final directory component: `FAIL` * No cookie sent for redirected path mismatch for different resources inside the same final directory component: `FAIL` * No cookie sent for redirected path mismatch where final path directory component ends in '/' and does not match redirected URL: `FAIL` * No cookie sent for redirected path mismatch with a similar start to the redirected URL: `FAIL` * No cookie sent for redirected path mismatch with trailing '?' after unquoted Path: `FAIL` * No cookie sent for redirected path mismatch with trailing '#' after unquoted Path: `FAIL` * No cookie sent for redirected path mismatch with trailing '/' after unquoted Path: `FAIL` * [/cookies/attributes/path.html](https://wpt.live/cookies/attributes/path.html) [[wpt.fyi](https://wpt.fyi/results/cookies/attributes/path.html)] * Set cookie for bare Path: `FAIL` * Set cookie for Path=: `FAIL` * Set cookie for mismatched and root path: `FAIL` * No cookie returned for partial path match, return cookie for default path: `FAIL` * Return cookie for path= / (whitespace after equals): `FAIL` * Return cookie for bare path= (after mismatched path): `FAIL` * [/cookies/attributes/secure.https.html](https://wpt.live/cookies/attributes/secure.https.html) [[wpt.fyi](https://wpt.fyi/results/cookies/attributes/secure.https.html)] * Set cookie for Secure attribute: `FAIL` * Set cookie for seCURe attribute: `FAIL` * Set cookie for for Secure= attribute: `FAIL` * Set cookie for Secure=aaaa: `FAIL` * Set cookie for Secure space equals: `FAIL` * Set cookie for Secure equals space: `FAIL` * Set cookie for spaced Secure: `FAIL` * Set cookie for space Secure with ;: `FAIL` * [/cookies/name/name-ctl.html](https://wpt.live/cookies/name/name-ctl.html) [[wpt.fyi](https://wpt.fyi/results/cookies/name/name-ctl.html)] * Cookie with %x7f in name is rejected (DOM).: `FAIL` * Cookie with %x1 in name is rejected (HTTP).: `FAIL` * Cookie with %x2 in name is rejected (HTTP).: `FAIL` * Cookie with %x3 in name is rejected (HTTP).: `FAIL` * Cookie with %x4 in name is rejected (HTTP).: `FAIL` * Cookie with %x5 in name is rejected (HTTP).: `FAIL` * Cookie with %x6 in name is rejected (HTTP).: `FAIL` * Cookie with %x7 in name is rejected (HTTP).: `FAIL` * Cookie with %x8 in name is rejected (HTTP).: `FAIL` * Cookie with %xb in name is rejected (HTTP).: `FAIL` * Cookie with %xc in name is rejected (HTTP).: `FAIL` * Cookie with %xe in name is rejected (HTTP).: `FAIL` * Cookie with %xf in name is rejected (HTTP).: `FAIL` * Cookie with %x10 in name is rejected (HTTP).: `FAIL` * Cookie with %x11 in name is rejected (HTTP).: `FAIL` * Cookie with %x12 in name is rejected (HTTP).: `FAIL` * Cookie with %x13 in name is rejected (HTTP).: `FAIL` * Cookie with %x14 in name is rejected (HTTP).: `FAIL` * Cookie with %x15 in name is rejected (HTTP).: `FAIL` * Cookie with %x16 in name is rejected (HTTP).: `FAIL` * Cookie with %x17 in name is rejected (HTTP).: `FAIL` * Cookie with %x18 in name is rejected (HTTP).: `FAIL` * Cookie with %x19 in name is rejected (HTTP).: `FAIL` * Cookie with %x1a in name is rejected (HTTP).: `FAIL` * Cookie with %x1b in name is rejected (HTTP).: `FAIL` * Cookie with %x1c in name is rejected (HTTP).: `FAIL` * Cookie with %x1d in name is rejected (HTTP).: `FAIL` * Cookie with %x1e in name is rejected (HTTP).: `FAIL` * Cookie with %x1f in name is rejected (HTTP).: `FAIL` * Cookie with %x7f in name is rejected (HTTP).: `FAIL` * [/cookies/name/name.html](https://wpt.live/cookies/name/name.html) [[wpt.fyi](https://wpt.fyi/results/cookies/name/name.html)] * Remove trailing WSP characters from the name string: `FAIL` * Remove leading WSP characters from the name string: `FAIL` * Only return the new cookie (with the same name): `FAIL` * Ignore invalid attributes after valid name (that looks like Cookie2 Version attribute): `FAIL` * Set a cookie that has whitespace in its name: `FAIL` * Use last value for cookies with identical names: `FAIL` * Keep first-in, first-out name order: `FAIL` * Keep first-in, first-out single-char name order: `FAIL` * Ignore nameless cookies that impersonate cookie prefixes: `FAIL` * Ignore cookie with empty name and empty value: `FAIL` * Ignore cookie with no name or value: `FAIL` * URL-encoded cookie name is not decoded: `FAIL` * Name is set as expected for a=test: `FAIL` * Name is set as expected for 1=test: `FAIL` * Name is set as expected for $=test: `FAIL` * Name is set as expected for !a=test: `FAIL` * Name is set as expected for @a=test: `FAIL` * Name is set as expected for #a=test: `FAIL` * Name is set as expected for $a=test: `FAIL` * Name is set as expected for %a=test: `FAIL` * Name is set as expected for ^a=test: `FAIL` * Name is set as expected for &a=test: `FAIL` * Name is set as expected for *a=test: `FAIL` * Name is set as expected for (a=test: `FAIL` * Name is set as expected for )a=test: `FAIL` * Name is set as expected for -a=test: `FAIL` * Name is set as expected for _a=test: `FAIL` * Name is set as expected for +=test: `FAIL` * Name is set as expected for "a=test: `FAIL` * [/cookies/size/name-and-value.html](https://wpt.live/cookies/size/name-and-value.html) [[wpt.fyi](https://wpt.fyi/results/cookies/size/name-and-value.html)] * Set max-size cookie with largest possible name and value (4096 bytes): `FAIL` * Ignore cookie with name larger than 4096 and 1 byte value: `FAIL` * Set max-size value-less cookie: `FAIL` * Ignore value-less cookie with name larger than 4096 bytes: `FAIL` * Set max-size cookie with largest possible value (4095 bytes): `FAIL` * Ignore named cookie (with non-zero length) and value larger than 4095 bytes: `FAIL` * Ignore named cookie with length larger than 4095 bytes, and a non-zero value: `FAIL` * Ignore name-less cookie with value larger than 4096 bytes: `FAIL` * Ignore name-less cookie (without leading =) with value larger than 4096 bytes: `FAIL` * Set max-size cookie that also has an attribute: `FAIL` * [/cookies/value/value.html](https://wpt.live/cookies/value/value.html) [[wpt.fyi](https://wpt.fyi/results/cookies/value/value.html)] * Set value with unbalanced leading quote: `FAIL` * Set cookie with large name + value ( = 4kb): `FAIL` * Ignore cookie with large name + value ( > 4kb): `FAIL` * Set cookie but ignore value after LF: `FAIL` * Set cookie ignoring whitespace after value endquote: `FAIL` * Ignore whitespace and ; after value: `FAIL` * Ignore whitespace preceding value: `FAIL` * Set cookie with quotes in value: `FAIL` * Set cookie keeping whitespace inside quoted value: `FAIL` * Set cookie with another = inside quoted value: `FAIL` * Set cookie ignoring whitespace surrounding value and characters after first semicolon: `FAIL` * URL-encoded cookie value is not decoded: `FAIL` * Set cookie with value set to =: `FAIL` * Set cookie with one = inside an unquoted value: `FAIL` * Set cookie with two = inside an unquoted value: `FAIL` * Set cookie with a space character in the value: `FAIL` (See attachment for full changes)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2aa61e4d3dcc [wpt PR 37739] - [Cookies] Update WPTs to set cookies with CTRL chars via HTTP, a=testonly https://hg.mozilla.org/integration/autoland/rev/f4939d0d64a9 [wpt PR 37739] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: