Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the Referrer-Policy tests allow further truncated referrers #29434

Merged
merged 2 commits into from
Jul 14, 2021

Conversation

gsnedders
Copy link
Member

This allows UAs to take advantage of the spec's allowance to be more aggressive than otherwise:

The user agent MAY alter referrerURL or referrerOrigin at this point to enforce arbitrary policy considerations in the interests of minimizing data leakage.

Notably, this increases the number that Safari passes considerably, avoiding the status quo of actual failures being largely hidden behind many more false-fails.

cc @johnwilander @foolip

Copy link
Member

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me, but I'd like review from @domfarolino (in META.yml) or @hiroshige-g who has touched this directory a lot.

referrer-policy/generic/test-case.sub.js Outdated Show resolved Hide resolved
This allows UAs to take advantage of the spec's allowance to be more
aggressive than otherwise:

> The user agent MAY alter referrerURL or referrerOrigin at this point
> to enforce arbitrary policy considerations in the interests of
> minimizing data leakage.
@gsnedders gsnedders merged commit e1720c5 into web-platform-tests:master Jul 14, 2021
@gsnedders gsnedders deleted the referrer-policy-loosen branch July 14, 2021 11:40
chromium-wpt-export-bot pushed a commit that referenced this pull request Aug 26, 2021
Previously, `no-referrer` was used as the Document's referrer policy
that shouldn't be used, but using `no-referrer`
(or more strict policies than expected in general) unexpectedly
is allowed as UA-specific policies.
This CL uses `unsafe-url` instead as long as possible, to make
tests fail if the policy is used

Bug: 1235205, #29434
Change-Id: I7e9aa4f5e5fbd4d8ff5a984f6647845ae0d0e2f1
chromium-wpt-export-bot pushed a commit that referenced this pull request Sep 4, 2021
Previously, `no-referrer` was used as the Document's referrer policy
that shouldn't be used.
But using the Document's referrer policy unexpectedly didn't cause
test failures, because
#29434 made
the tests to allow UA-specific policies more strict than expected,
and using `no-referrer` is always allowed.

This CL uses `unsafe-url` instead as long as possible, to make
tests fail if the policy is used unexpectedly.
`unsafe-url` is likely to result in less strict referrers that
aren't allowed as UA-specific policies.

Bug: 1235205, #29434
Change-Id: I7e9aa4f5e5fbd4d8ff5a984f6647845ae0d0e2f1
chromium-wpt-export-bot pushed a commit that referenced this pull request Sep 7, 2021
Previously, `no-referrer` was used as the Document's referrer policy
that shouldn't be used.
But using the Document's referrer policy unexpectedly didn't cause
test failures, because
#29434 made
the tests to allow UA-specific policies more strict than expected,
and using `no-referrer` is always allowed.

This CL uses `unsafe-url` instead as long as possible, to make
tests fail if the policy is used unexpectedly.
`unsafe-url` is likely to result in less strict referrers that
aren't allowed as UA-specific policies.

Bug: 1235205, #29434
Change-Id: I7e9aa4f5e5fbd4d8ff5a984f6647845ae0d0e2f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3123715
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918861}
chromium-wpt-export-bot pushed a commit that referenced this pull request Sep 7, 2021
Previously, `no-referrer` was used as the Document's referrer policy
that shouldn't be used.
But using the Document's referrer policy unexpectedly didn't cause
test failures, because
#29434 made
the tests to allow UA-specific policies more strict than expected,
and using `no-referrer` is always allowed.

This CL uses `unsafe-url` instead as long as possible, to make
tests fail if the policy is used unexpectedly.
`unsafe-url` is likely to result in less strict referrers that
aren't allowed as UA-specific policies.

Bug: 1235205, #29434
Change-Id: I7e9aa4f5e5fbd4d8ff5a984f6647845ae0d0e2f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3123715
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918861}
pull bot pushed a commit to jamlee-t/chromium that referenced this pull request Sep 8, 2021
Previously, `no-referrer` was used as the Document's referrer policy
that shouldn't be used.
But using the Document's referrer policy unexpectedly didn't cause
test failures, because
web-platform-tests/wpt#29434 made
the tests to allow UA-specific policies more strict than expected,
and using `no-referrer` is always allowed.

This CL uses `unsafe-url` instead as long as possible, to make
tests fail if the policy is used unexpectedly.
`unsafe-url` is likely to result in less strict referrers that
aren't allowed as UA-specific policies.

Bug: 1235205, web-platform-tests/wpt#29434
Change-Id: I7e9aa4f5e5fbd4d8ff5a984f6647845ae0d0e2f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3123715
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918861}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Sep 22, 2021
…"another policy", a=testonly

Automatic update from web-platform-tests
[WPT/referrer-policy] Use unsafe-url as "another policy"

Previously, `no-referrer` was used as the Document's referrer policy
that shouldn't be used.
But using the Document's referrer policy unexpectedly didn't cause
test failures, because
web-platform-tests/wpt#29434 made
the tests to allow UA-specific policies more strict than expected,
and using `no-referrer` is always allowed.

This CL uses `unsafe-url` instead as long as possible, to make
tests fail if the policy is used unexpectedly.
`unsafe-url` is likely to result in less strict referrers that
aren't allowed as UA-specific policies.

Bug: 1235205, web-platform-tests/wpt#29434
Change-Id: I7e9aa4f5e5fbd4d8ff5a984f6647845ae0d0e2f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3123715
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918861}

--

wpt-commits: 56b450b126e7dc860ae69ce33bcee73bd3e33bd9
wpt-pr: 30202
aosmond pushed a commit to aosmond/gecko that referenced this pull request Sep 24, 2021
…"another policy", a=testonly

Automatic update from web-platform-tests
[WPT/referrer-policy] Use unsafe-url as "another policy"

Previously, `no-referrer` was used as the Document's referrer policy
that shouldn't be used.
But using the Document's referrer policy unexpectedly didn't cause
test failures, because
web-platform-tests/wpt#29434 made
the tests to allow UA-specific policies more strict than expected,
and using `no-referrer` is always allowed.

This CL uses `unsafe-url` instead as long as possible, to make
tests fail if the policy is used unexpectedly.
`unsafe-url` is likely to result in less strict referrers that
aren't allowed as UA-specific policies.

Bug: 1235205, web-platform-tests/wpt#29434
Change-Id: I7e9aa4f5e5fbd4d8ff5a984f6647845ae0d0e2f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3123715
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918861}

--

wpt-commits: 56b450b126e7dc860ae69ce33bcee73bd3e33bd9
wpt-pr: 30202
Gabisampaio pushed a commit to Gabisampaio/wpt that referenced this pull request Nov 18, 2021
Previously, `no-referrer` was used as the Document's referrer policy
that shouldn't be used.
But using the Document's referrer policy unexpectedly didn't cause
test failures, because
web-platform-tests#29434 made
the tests to allow UA-specific policies more strict than expected,
and using `no-referrer` is always allowed.

This CL uses `unsafe-url` instead as long as possible, to make
tests fail if the policy is used unexpectedly.
`unsafe-url` is likely to result in less strict referrers that
aren't allowed as UA-specific policies.

Bug: 1235205, web-platform-tests#29434
Change-Id: I7e9aa4f5e5fbd4d8ff5a984f6647845ae0d0e2f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3123715
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918861}
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
Previously, `no-referrer` was used as the Document's referrer policy
that shouldn't be used.
But using the Document's referrer policy unexpectedly didn't cause
test failures, because
web-platform-tests/wpt#29434 made
the tests to allow UA-specific policies more strict than expected,
and using `no-referrer` is always allowed.

This CL uses `unsafe-url` instead as long as possible, to make
tests fail if the policy is used unexpectedly.
`unsafe-url` is likely to result in less strict referrers that
aren't allowed as UA-specific policies.

Bug: 1235205, web-platform-tests/wpt#29434
Change-Id: I7e9aa4f5e5fbd4d8ff5a984f6647845ae0d0e2f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3123715
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918861}
NOKEYCHECK=True
GitOrigin-RevId: 056e52a6653bb773973e058a76f1d7843403eb2b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants