From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- ...-with-and-without-leading-period.sub.https.html | 40 ++++++++++++ ...thout-leading-period.sub.https.html.sub.headers | 2 + ...tribute-host-with-leading-period.sub.https.html | 39 ++++++++++++ ...-with-leading-period.sub.https.html.sub.headers | 1 + .../domain-attribute-idn-host.sub.https.html | 18 ++++++ .../domain-attribute-matches-host.sub.https.html | 39 ++++++++++++ ...tribute-matches-host.sub.https.html.sub.headers | 1 + .../domain/domain-attribute-missing.sub.html | 39 ++++++++++++ .../domain-attribute-missing.sub.html.headers | 1 + .../domain/support/idn-child.sub.https.html | 72 ++++++++++++++++++++++ .../tests/cookies/domain/support/idn.py | 61 ++++++++++++++++++ 11 files changed, 313 insertions(+) create mode 100644 testing/web-platform/tests/cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.https.html create mode 100644 testing/web-platform/tests/cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.https.html.sub.headers create mode 100644 testing/web-platform/tests/cookies/domain/domain-attribute-host-with-leading-period.sub.https.html create mode 100644 testing/web-platform/tests/cookies/domain/domain-attribute-host-with-leading-period.sub.https.html.sub.headers create mode 100644 testing/web-platform/tests/cookies/domain/domain-attribute-idn-host.sub.https.html create mode 100644 testing/web-platform/tests/cookies/domain/domain-attribute-matches-host.sub.https.html create mode 100644 testing/web-platform/tests/cookies/domain/domain-attribute-matches-host.sub.https.html.sub.headers create mode 100644 testing/web-platform/tests/cookies/domain/domain-attribute-missing.sub.html create mode 100644 testing/web-platform/tests/cookies/domain/domain-attribute-missing.sub.html.headers create mode 100644 testing/web-platform/tests/cookies/domain/support/idn-child.sub.https.html create mode 100644 testing/web-platform/tests/cookies/domain/support/idn.py (limited to 'testing/web-platform/tests/cookies/domain') diff --git a/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.https.html b/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.https.html new file mode 100644 index 0000000000..b5f770b848 --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.https.html @@ -0,0 +1,40 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.https.html.sub.headers b/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.https.html.sub.headers new file mode 100644 index 0000000000..77d3d8c0c4 --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.https.html.sub.headers @@ -0,0 +1,2 @@ +Set-Cookie: domain-attribute-host-with-and-without-leading-period=b; Path=/; Domain=.{{host}} +Set-Cookie: domain-attribute-host-with-and-without-leading-period=c; Path=/; Domain={{host}} diff --git a/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-leading-period.sub.https.html b/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-leading-period.sub.https.html new file mode 100644 index 0000000000..3ec52fd40b --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-leading-period.sub.https.html @@ -0,0 +1,39 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-leading-period.sub.https.html.sub.headers b/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-leading-period.sub.https.html.sub.headers new file mode 100644 index 0000000000..7de4ae2e6a --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/domain-attribute-host-with-leading-period.sub.https.html.sub.headers @@ -0,0 +1 @@ +Set-Cookie: domain-attribute-host-with-leading-period=b; Path=/; Domain=.{{host}} diff --git a/testing/web-platform/tests/cookies/domain/domain-attribute-idn-host.sub.https.html b/testing/web-platform/tests/cookies/domain/domain-attribute-idn-host.sub.https.html new file mode 100644 index 0000000000..ae4bf3cbb3 --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/domain-attribute-idn-host.sub.https.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + diff --git a/testing/web-platform/tests/cookies/domain/domain-attribute-matches-host.sub.https.html b/testing/web-platform/tests/cookies/domain/domain-attribute-matches-host.sub.https.html new file mode 100644 index 0000000000..ac786dd882 --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/domain-attribute-matches-host.sub.https.html @@ -0,0 +1,39 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/cookies/domain/domain-attribute-matches-host.sub.https.html.sub.headers b/testing/web-platform/tests/cookies/domain/domain-attribute-matches-host.sub.https.html.sub.headers new file mode 100644 index 0000000000..8a2329e8c2 --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/domain-attribute-matches-host.sub.https.html.sub.headers @@ -0,0 +1 @@ +Set-Cookie: domain-attribute-matches-host=b; Path=/; Domain={{host}} diff --git a/testing/web-platform/tests/cookies/domain/domain-attribute-missing.sub.html b/testing/web-platform/tests/cookies/domain/domain-attribute-missing.sub.html new file mode 100644 index 0000000000..44776ca629 --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/domain-attribute-missing.sub.html @@ -0,0 +1,39 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/cookies/domain/domain-attribute-missing.sub.html.headers b/testing/web-platform/tests/cookies/domain/domain-attribute-missing.sub.html.headers new file mode 100644 index 0000000000..3ee2833a45 --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/domain-attribute-missing.sub.html.headers @@ -0,0 +1 @@ +Set-Cookie: domain-attribute-missing=b; Path=/ diff --git a/testing/web-platform/tests/cookies/domain/support/idn-child.sub.https.html b/testing/web-platform/tests/cookies/domain/support/idn-child.sub.https.html new file mode 100644 index 0000000000..d3510959fb --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/support/idn-child.sub.https.html @@ -0,0 +1,72 @@ + + + + + + + + + + + + diff --git a/testing/web-platform/tests/cookies/domain/support/idn.py b/testing/web-platform/tests/cookies/domain/support/idn.py new file mode 100644 index 0000000000..d75ed056f5 --- /dev/null +++ b/testing/web-platform/tests/cookies/domain/support/idn.py @@ -0,0 +1,61 @@ +# élève. +utf8_subdomain = b"Domain=\xC3\xA9\x6C\xC3\xA8\x76\x65." +# élève。 +utf8_dot_subdomain = b"Domain=\xC3\xA9\x6C\xC3\xA8\x76\x65\xE3\x80\x82" +# élève. +punycode_subdomain = b"Domain=xn--lve-6lad." +# ÿlève. +wrong_utf8_subdomain = b"Domain=\xC3\xBF\x6C\xC3\xA8\x76\x65." +# ÿlève. +wrong_punycode_subdomain = b"Domain=xn--lve-6la7i." +# élève with invalid FF byte at the end +invalid_byte_subdomain = b"Domain=\xC3\xA9\x6C\xC3\xA8\x76\x65\xFF." + +def main(request, response): + host = request.GET.get(b"host") + + if b"set-utf8" in request.GET: + response.headers.append(b"Set-Cookie", b"utf8=set;" + utf8_subdomain + host) + response.content = "set" + if b"set-utf8-dot" in request.GET: + response.headers.append(b"Set-Cookie", b"utf8-dot=set;" + utf8_dot_subdomain + host) + response.content = "set" + elif b"set-wrong-utf8" in request.GET: + response.headers.append(b"Set-Cookie", b"wrong-utf8=set;" + wrong_utf8_subdomain + host) + response.content = "set" + elif b"set-punycode" in request.GET: + response.headers.append(b"Set-Cookie", b"punycode=set;" + punycode_subdomain + host) + response.content = "set" + elif b"set-wrong-punycode" in request.GET: + response.headers.append(b"Set-Cookie", b"wrong-punycode=set;" + wrong_punycode_subdomain + host) + response.content = "set" + elif b"set-invalid-byte" in request.GET: + response.headers.append(b"Set-Cookie", b"invalid-byte=set;" + invalid_byte_subdomain + host) + response.content = "set" + + elif b"get" in request.GET: + if b"Cookie" in request.headers: + response.content = request.headers[b"Cookie"] + else: + response.content = "no cookies" + + elif b"delete-utf8" in request.GET: + response.headers.append(b"Set-Cookie", b"utf8=unset;Max-Age=0;" + utf8_subdomain + host) + response.content = "delete" + elif b"delete-utf8-dot" in request.GET: + response.headers.append(b"Set-Cookie", b"utf8-dot=unset;Max-Age=0;" + utf8_dot_subdomain + host) + response.content = "delete" + elif b"delete-wrong-utf8" in request.GET: + response.headers.append(b"Set-Cookie", b"wrong-utf8=unset;Max-Age=0;" + wrong_utf8_subdomain + host) + response.content = "delete" + elif b"delete-punycode" in request.GET: + response.headers.append(b"Set-Cookie", b"punycode=unset;Max-Age=0;" + punycode_subdomain + host) + response.content = "delete" + elif b"delete-wrong-punycode" in request.GET: + response.headers.append(b"Set-Cookie", b"wrong-punycode=unset;Max-Age=0;" + wrong_punycode_subdomain + host) + response.content = "delete" + elif b"delete-invalid-byte" in request.GET: + response.headers.append(b"Set-Cookie", b"invalid-byte=unset;Max-Age=0;" + invalid_byte_subdomain + host) + response.content = "delete" + + response.headers.append(b"Content-Type", b"text/plain") -- cgit v1.2.3