Commit 8f1fa724 authored by Hiroshige Hayashizaki's avatar Hiroshige Hayashizaki Committed by Commit Bot

[WPT/referrer-policy] Rename referrer_policy to delivery_value

To use common structures and names in referrer-policy and
mixed-content tests, this CL

- Renames `referrer_policy` to `delivery_value`, and
- Moves it under `test_expansion`, because in mixed-content
  tests `delivery_value` can be different among multiple
  `test_expansion` entries under a single `specification` entry.

Accordingly, `referrer_policy_schema` is moved to
`test_expansion_schema`'s `delivery_value`, and
related checks in spec_validator are removed.

Generated files will be updated after some more changes, not now.

Bug: 906850
Change-Id: I28beb09ab2eb4c69ec598de415d81cd1c8f77765
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1717592Reviewed-by: default avatarKenichi Ishibashi <bashi@chromium.org>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681076}
parent a9f47113
...@@ -58,11 +58,6 @@ def dump_test_parameters(selection): ...@@ -58,11 +58,6 @@ def dump_test_parameters(selection):
def generate_selection(config, selection, spec, test_html_template_basename): def generate_selection(config, selection, spec, test_html_template_basename):
# TODO: Refactor out this referrer-policy-specific part.
if 'referrer_policy' in spec:
# Oddball: it can be None, so in JS it's null.
selection['referrer_policy'] = spec['referrer_policy']
test_parameters = dump_test_parameters(selection) test_parameters = dump_test_parameters(selection)
# Adjust the template for the test invoking JS. Indent it to look nice. # Adjust the template for the test invoking JS. Indent it to look nice.
indent = "\n" + " " * 8 indent = "\n" + " " * 8
......
...@@ -44,7 +44,7 @@ the target request is %(origin)s.''' ...@@ -44,7 +44,7 @@ the target request is %(origin)s.'''
def handleDelivery(self, selection, spec): def handleDelivery(self, selection, spec):
delivery_type = selection['delivery_type'] delivery_type = selection['delivery_type']
delivery_value = spec['referrer_policy'] delivery_value = selection['delivery_value']
meta = '' meta = ''
headers = [] headers = []
......
...@@ -36,7 +36,8 @@ def assert_value_from(obj, field, items): ...@@ -36,7 +36,8 @@ def assert_value_from(obj, field, items):
def assert_atom_or_list_items_from(obj, field, items): def assert_atom_or_list_items_from(obj, field, items):
if isinstance(obj[field], basestring) or isinstance(obj[field], int): if isinstance(obj[field], basestring) or isinstance(
obj[field], int) or obj[field] is None:
assert_value_from(obj, field, items) assert_value_from(obj, field, items)
return return
...@@ -77,16 +78,14 @@ def validate(spec_json, details): ...@@ -77,16 +78,14 @@ def validate(spec_json, details):
details['object'] = spec_json details['object'] = spec_json
assert_contains_only_fields(spec_json, [ assert_contains_only_fields(spec_json, [
"specification", "referrer_policy_schema", "delivery_key", "specification", "delivery_key", "test_expansion_schema",
"test_expansion_schema", "excluded_tests" "excluded_tests"
]) ])
assert_non_empty_list(spec_json, "specification") assert_non_empty_list(spec_json, "specification")
assert_non_empty_list(spec_json, "referrer_policy_schema")
assert_non_empty_dict(spec_json, "test_expansion_schema") assert_non_empty_dict(spec_json, "test_expansion_schema")
assert_non_empty_list(spec_json, "excluded_tests") assert_non_empty_list(spec_json, "excluded_tests")
specification = spec_json['specification'] specification = spec_json['specification']
referrer_policy_schema = spec_json['referrer_policy_schema']
test_expansion_schema = spec_json['test_expansion_schema'] test_expansion_schema = spec_json['test_expansion_schema']
excluded_tests = spec_json['excluded_tests'] excluded_tests = spec_json['excluded_tests']
...@@ -98,14 +97,13 @@ def validate(spec_json, details): ...@@ -98,14 +97,13 @@ def validate(spec_json, details):
# Validate required fields for a single spec. # Validate required fields for a single spec.
assert_contains_only_fields(spec, [ assert_contains_only_fields(spec, [
'name', 'title', 'description', 'referrer_policy', 'name', 'title', 'description', 'specification_url',
'specification_url', 'test_expansion' 'test_expansion'
]) ])
assert_non_empty_string(spec, 'name') assert_non_empty_string(spec, 'name')
assert_non_empty_string(spec, 'title') assert_non_empty_string(spec, 'title')
assert_non_empty_string(spec, 'description') assert_non_empty_string(spec, 'description')
assert_non_empty_string(spec, 'specification_url') assert_non_empty_string(spec, 'specification_url')
assert_value_from(spec, 'referrer_policy', referrer_policy_schema)
assert_non_empty_list(spec, 'test_expansion') assert_non_empty_list(spec, 'test_expansion')
# Validate spec's test expansion. # Validate spec's test expansion.
...@@ -128,8 +126,9 @@ def validate(spec_json, details): ...@@ -128,8 +126,9 @@ def validate(spec_json, details):
# Validate the test_expansion schema members. # Validate the test_expansion schema members.
details['object'] = test_expansion_schema details['object'] = test_expansion_schema
assert_contains_only_fields(test_expansion_schema, [ assert_contains_only_fields(test_expansion_schema, [
'expansion', 'delivery_type', 'redirection', 'origin', 'expansion', 'delivery_type', 'delivery_value', 'redirection',
'source_protocol', 'target_protocol', 'subresource', 'expectation' 'origin', 'source_protocol', 'target_protocol', 'subresource',
'expectation'
]) ])
# Validate excluded tests. # Validate excluded tests.
details['object'] = excluded_tests details['object'] = excluded_tests
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
"title": "Referrer Policy is not explicitly defined", "title": "Referrer Policy is not explicitly defined",
"description": "Check that referrer URL follows no-referrer-when-downgrade policy when no explicit Referrer Policy is set.", "description": "Check that referrer URL follows no-referrer-when-downgrade policy when no explicit Referrer Policy is set.",
"specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policies", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policies",
"referrer_policy": null,
"test_expansion": [ "test_expansion": [
{ {
"name": "insecure-protocol", "name": "insecure-protocol",
...@@ -13,6 +12,7 @@ ...@@ -13,6 +12,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": null,
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": null,
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -35,6 +36,7 @@ ...@@ -35,6 +36,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": null,
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -46,6 +48,7 @@ ...@@ -46,6 +48,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": null,
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -58,7 +61,6 @@ ...@@ -58,7 +61,6 @@
"title": "Referrer Policy is set to 'no-referrer'", "title": "Referrer Policy is set to 'no-referrer'",
"description": "Check that sub-resource never gets the referrer URL.", "description": "Check that sub-resource never gets the referrer URL.",
"specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer",
"referrer_policy": "no-referrer",
"test_expansion": [ "test_expansion": [
{ {
"name": "generic", "name": "generic",
...@@ -66,6 +68,7 @@ ...@@ -66,6 +68,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "no-referrer",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -78,7 +81,6 @@ ...@@ -78,7 +81,6 @@
"title": "Referrer Policy is set to 'no-referrer-when-downgrade'", "title": "Referrer Policy is set to 'no-referrer-when-downgrade'",
"description": "Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.", "description": "Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.",
"specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade",
"referrer_policy": "no-referrer-when-downgrade",
"test_expansion": [ "test_expansion": [
{ {
"name": "insecure-protocol", "name": "insecure-protocol",
...@@ -86,6 +88,7 @@ ...@@ -86,6 +88,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "no-referrer-when-downgrade",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -97,6 +100,7 @@ ...@@ -97,6 +100,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "no-referrer-when-downgrade",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -108,6 +112,7 @@ ...@@ -108,6 +112,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "no-referrer-when-downgrade",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -119,6 +124,7 @@ ...@@ -119,6 +124,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "no-referrer-when-downgrade",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -131,7 +137,6 @@ ...@@ -131,7 +137,6 @@
"title": "Referrer Policy is set to 'origin'", "title": "Referrer Policy is set to 'origin'",
"description": "Check that all subresources in all casses get only the origin portion of the referrer URL.", "description": "Check that all subresources in all casses get only the origin portion of the referrer URL.",
"specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin",
"referrer_policy": "origin",
"test_expansion": [ "test_expansion": [
{ {
"name": "generic", "name": "generic",
...@@ -139,6 +144,7 @@ ...@@ -139,6 +144,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -151,7 +157,6 @@ ...@@ -151,7 +157,6 @@
"title": "Referrer Policy is set to 'same-origin'", "title": "Referrer Policy is set to 'same-origin'",
"description": "Check that cross-origin subresources get no referrer information and same-origin get the stripped referrer URL.", "description": "Check that cross-origin subresources get no referrer information and same-origin get the stripped referrer URL.",
"specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin",
"referrer_policy": "same-origin",
"test_expansion": [ "test_expansion": [
{ {
"name": "same-origin-insecure", "name": "same-origin-insecure",
...@@ -159,6 +164,7 @@ ...@@ -159,6 +164,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "same-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -170,6 +176,7 @@ ...@@ -170,6 +176,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "same-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -181,6 +188,7 @@ ...@@ -181,6 +188,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "same-origin",
"redirection": "swap-origin-redirect", "redirection": "swap-origin-redirect",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -192,6 +200,7 @@ ...@@ -192,6 +200,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "same-origin",
"redirection": "*", "redirection": "*",
"origin": "cross-origin", "origin": "cross-origin",
"subresource": "*", "subresource": "*",
...@@ -204,7 +213,6 @@ ...@@ -204,7 +213,6 @@
"title": "Referrer Policy is set to 'origin-when-cross-origin'", "title": "Referrer Policy is set to 'origin-when-cross-origin'",
"description": "Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.", "description": "Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.",
"specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin",
"referrer_policy": "origin-when-cross-origin",
"test_expansion": [ "test_expansion": [
{ {
"name": "same-origin-insecure", "name": "same-origin-insecure",
...@@ -212,6 +220,7 @@ ...@@ -212,6 +220,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -223,6 +232,7 @@ ...@@ -223,6 +232,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -234,6 +244,7 @@ ...@@ -234,6 +244,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -245,6 +256,7 @@ ...@@ -245,6 +256,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -256,6 +268,7 @@ ...@@ -256,6 +268,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "origin-when-cross-origin",
"redirection": "swap-origin-redirect", "redirection": "swap-origin-redirect",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -267,6 +280,7 @@ ...@@ -267,6 +280,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "cross-origin", "origin": "cross-origin",
"subresource": "*", "subresource": "*",
...@@ -279,7 +293,6 @@ ...@@ -279,7 +293,6 @@
"title": "Referrer Policy is set to 'strict-origin'", "title": "Referrer Policy is set to 'strict-origin'",
"description": "Check that non a priori insecure subresource gets only the origin portion of the referrer URL. A priori insecure subresource gets no referrer information.", "description": "Check that non a priori insecure subresource gets only the origin portion of the referrer URL. A priori insecure subresource gets no referrer information.",
"specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin",
"referrer_policy": "strict-origin",
"test_expansion": [ "test_expansion": [
{ {
"name": "insecure-protocol", "name": "insecure-protocol",
...@@ -287,6 +300,7 @@ ...@@ -287,6 +300,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -298,6 +312,7 @@ ...@@ -298,6 +312,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -309,6 +324,7 @@ ...@@ -309,6 +324,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -320,6 +336,7 @@ ...@@ -320,6 +336,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -332,7 +349,6 @@ ...@@ -332,7 +349,6 @@
"title": "Referrer Policy is set to 'strict-origin-when-cross-origin'", "title": "Referrer Policy is set to 'strict-origin-when-cross-origin'",
"description": "Check that a priori insecure subresource gets no referrer information. Otherwise, cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.", "description": "Check that a priori insecure subresource gets no referrer information. Otherwise, cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.",
"specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin",
"referrer_policy": "strict-origin-when-cross-origin",
"test_expansion": [ "test_expansion": [
{ {
"name": "same-insecure", "name": "same-insecure",
...@@ -340,6 +356,7 @@ ...@@ -340,6 +356,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -351,6 +368,7 @@ ...@@ -351,6 +368,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin-when-cross-origin",
"redirection": "swap-origin-redirect", "redirection": "swap-origin-redirect",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -362,6 +380,7 @@ ...@@ -362,6 +380,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "cross-origin", "origin": "cross-origin",
"subresource": "*", "subresource": "*",
...@@ -373,6 +392,7 @@ ...@@ -373,6 +392,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -384,6 +404,7 @@ ...@@ -384,6 +404,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -395,6 +416,7 @@ ...@@ -395,6 +416,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -406,6 +428,7 @@ ...@@ -406,6 +428,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin-when-cross-origin",
"redirection": "swap-origin-redirect", "redirection": "swap-origin-redirect",
"origin": "same-origin", "origin": "same-origin",
"subresource": "*", "subresource": "*",
...@@ -417,6 +440,7 @@ ...@@ -417,6 +440,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "strict-origin-when-cross-origin",
"redirection": "*", "redirection": "*",
"origin": "cross-origin", "origin": "cross-origin",
"subresource": "*", "subresource": "*",
...@@ -429,7 +453,6 @@ ...@@ -429,7 +453,6 @@
"title": "Referrer Policy is set to 'unsafe-url'", "title": "Referrer Policy is set to 'unsafe-url'",
"description": "Check that all sub-resources get the stripped referrer URL.", "description": "Check that all sub-resources get the stripped referrer URL.",
"specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-unsafe-url", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-unsafe-url",
"referrer_policy": "unsafe-url",
"test_expansion": [ "test_expansion": [
{ {
"name": "generic", "name": "generic",
...@@ -437,6 +460,7 @@ ...@@ -437,6 +460,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["http-rp", "meta-referrer", "attr-referrer"], "delivery_type": ["http-rp", "meta-referrer", "attr-referrer"],
"delivery_value": "unsafe-url",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -456,6 +480,7 @@ ...@@ -456,6 +480,7 @@
"target_protocol": "*", "target_protocol": "*",
"redirection": "*", "redirection": "*",
"delivery_type": "*", "delivery_type": "*",
"delivery_value": "*",
"origin": "cross-origin", "origin": "cross-origin",
"subresource": [ "subresource": [
"worker-request", "worker-request",
...@@ -470,6 +495,7 @@ ...@@ -470,6 +495,7 @@
"source_protocol": "http", "source_protocol": "http",
"target_protocol": "https", "target_protocol": "https",
"delivery_type": "*", "delivery_type": "*",
"delivery_value": "*",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": [ "subresource": [
...@@ -485,6 +511,7 @@ ...@@ -485,6 +511,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "http", "target_protocol": "http",
"delivery_type": "*", "delivery_type": "*",
"delivery_value": "*",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -496,6 +523,7 @@ ...@@ -496,6 +523,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["attr-referrer"], "delivery_type": ["attr-referrer"],
"delivery_value": "*",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": [ "subresource": [
...@@ -513,6 +541,7 @@ ...@@ -513,6 +541,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": ["rel-noreferrer"], "delivery_type": ["rel-noreferrer"],
"delivery_value": "*",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": [ "subresource": [
...@@ -534,6 +563,7 @@ ...@@ -534,6 +563,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": "*", "delivery_type": "*",
"delivery_value": "*",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "area-tag", "subresource": "area-tag",
...@@ -545,6 +575,7 @@ ...@@ -545,6 +575,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": "*", "delivery_type": "*",
"delivery_value": "*",
"redirection": "swap-origin-redirect", "redirection": "swap-origin-redirect",
"origin": "*", "origin": "*",
"subresource": [ "subresource": [
...@@ -560,6 +591,7 @@ ...@@ -560,6 +591,7 @@
"source_protocol": "*", "source_protocol": "*",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": "*", "delivery_type": "*",
"delivery_value": "*",
"redirection": ["keep-origin-redirect", "swap-origin-redirect"], "redirection": ["keep-origin-redirect", "swap-origin-redirect"],
"origin": "*", "origin": "*",
"subresource": ["a-tag", "area-tag"], "subresource": ["a-tag", "area-tag"],
...@@ -571,6 +603,7 @@ ...@@ -571,6 +603,7 @@
"source_protocol": "https", "source_protocol": "https",
"target_protocol": "*", "target_protocol": "*",
"delivery_type": "*", "delivery_type": "*",
"delivery_value": "*",
"redirection": "*", "redirection": "*",
"origin": "*", "origin": "*",
"subresource": "*", "subresource": "*",
...@@ -578,18 +611,6 @@ ...@@ -578,18 +611,6 @@
} }
], ],
"referrer_policy_schema": [
null,
"no-referrer",
"no-referrer-when-downgrade",
"same-origin",
"origin",
"origin-when-cross-origin",
"strict-origin",
"strict-origin-when-cross-origin",
"unsafe-url"
],
"test_expansion_schema": { "test_expansion_schema": {
"expansion": [ "expansion": [
"default", "default",
...@@ -603,6 +624,18 @@ ...@@ -603,6 +624,18 @@
"rel-noreferrer" "rel-noreferrer"
], ],
"delivery_value": [
null,
"no-referrer",
"no-referrer-when-downgrade",
"same-origin",
"origin",
"origin-when-cross-origin",
"strict-origin",
"strict-origin-when-cross-origin",
"unsafe-url"
],
"origin": [ "origin": [
"same-origin", "same-origin",
"cross-origin" "cross-origin"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment