Update referrer computation

Update unit tests for determine_requests_referrer

Update wpt metadata

Add missing spec links
This commit is contained in:
Utsav Oza 2020-06-28 14:45:38 +05:30
parent 83b2f0de0b
commit 310821d3b0
26 changed files with 229 additions and 585 deletions

View file

@ -5,7 +5,7 @@
use crate::data_loader::decode; use crate::data_loader::decode;
use crate::fetch::cors_cache::CorsCache; use crate::fetch::cors_cache::CorsCache;
use crate::filemanager_thread::{FileManager, FILE_CHUNK_SIZE}; use crate::filemanager_thread::{FileManager, FILE_CHUNK_SIZE};
use crate::http_loader::{determine_request_referrer, http_fetch, HttpState}; use crate::http_loader::{determine_requests_referrer, http_fetch, HttpState};
use crate::http_loader::{set_default_accept, set_default_accept_language}; use crate::http_loader::{set_default_accept, set_default_accept_language};
use crate::subresource_integrity::is_response_integrity_valid; use crate::subresource_integrity::is_response_integrity_valid;
use content_security_policy as csp; use content_security_policy as csp;
@ -236,25 +236,19 @@ pub fn main_fetch(
.or(Some(ReferrerPolicy::NoReferrerWhenDowngrade)); .or(Some(ReferrerPolicy::NoReferrerWhenDowngrade));
// Step 8. // Step 8.
{ assert!(request.referrer_policy.is_some());
let referrer_url = match mem::replace(&mut request.referrer, Referrer::NoReferrer) { let referrer_url = match mem::replace(&mut request.referrer, Referrer::NoReferrer) {
Referrer::NoReferrer => None, Referrer::NoReferrer => None,
Referrer::ReferrerUrl(url) | Referrer::Client(url) => { Referrer::ReferrerUrl(referrer_source) | Referrer::Client(referrer_source) => {
request.headers.remove(header::REFERER); request.headers.remove(header::REFERER);
let current_url = request.current_url(); determine_requests_referrer(
determine_request_referrer(
&mut request.headers,
request.referrer_policy.unwrap(), request.referrer_policy.unwrap(),
url, referrer_source,
current_url, request.current_url(),
request.https_state,
) )
}, },
}; };
if let Some(referrer_url) = referrer_url { request.referrer = referrer_url.map_or(Referrer::NoReferrer, |url| Referrer::ReferrerUrl(url));
request.referrer = Referrer::ReferrerUrl(referrer_url);
}
}
// Step 9. // Step 9.
// TODO: handle FTP URLs. // TODO: handle FTP URLs.

View file

@ -180,43 +180,40 @@ pub fn set_default_accept_language(headers: &mut HeaderMap) {
} }
/// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-state-no-referrer-when-downgrade> /// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-state-no-referrer-when-downgrade>
fn no_referrer_when_downgrade_header( fn no_referrer_when_downgrade(referrer_url: ServoUrl, current_url: ServoUrl) -> Option<ServoUrl> {
referrer_url: ServoUrl, // Step 1
url: ServoUrl, if referrer_url.is_potentially_trustworthy() && !current_url.is_potentially_trustworthy() {
https_state: HttpsState,
) -> Option<ServoUrl> {
if https_state == HttpsState::Modern && !url.is_origin_trustworthy() {
return None; return None;
} }
return strip_url(referrer_url, false); // Step 2
return strip_url_for_use_as_referrer(referrer_url, false);
} }
/// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin> /// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin>
fn strict_origin( fn strict_origin(referrer_url: ServoUrl, current_url: ServoUrl) -> Option<ServoUrl> {
referrer_url: ServoUrl, // Step 1
url: ServoUrl, if referrer_url.is_potentially_trustworthy() && !current_url.is_potentially_trustworthy() {
https_state: HttpsState,
) -> Option<ServoUrl> {
if https_state == HttpsState::Modern && !url.is_origin_trustworthy() {
return None; return None;
} }
strip_url(referrer_url, true) // Step 2
strip_url_for_use_as_referrer(referrer_url, true)
} }
/// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin> /// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin>
fn strict_origin_when_cross_origin( fn strict_origin_when_cross_origin(
referrer_url: ServoUrl, referrer_url: ServoUrl,
url: ServoUrl, current_url: ServoUrl,
https_state: HttpsState,
) -> Option<ServoUrl> { ) -> Option<ServoUrl> {
let same_origin = referrer_url.origin() == url.origin(); // Step 1
if same_origin { if referrer_url.origin() == current_url.origin() {
return strip_url(referrer_url, false); return strip_url_for_use_as_referrer(referrer_url, false);
} }
if https_state == HttpsState::Modern && !url.is_origin_trustworthy() { // Step 2
if referrer_url.is_potentially_trustworthy() && !current_url.is_potentially_trustworthy() {
return None; return None;
} }
strip_url(referrer_url, true) // Step 3
strip_url_for_use_as_referrer(referrer_url, true)
} }
/// https://html.spec.whatwg.org/multipage/#schemelessly-same-site /// https://html.spec.whatwg.org/multipage/#schemelessly-same-site
@ -242,56 +239,70 @@ fn is_schemelessy_same_site(site_a: &ImmutableOrigin, site_b: &ImmutableOrigin)
} }
/// <https://w3c.github.io/webappsec-referrer-policy/#strip-url> /// <https://w3c.github.io/webappsec-referrer-policy/#strip-url>
fn strip_url(mut referrer_url: ServoUrl, origin_only: bool) -> Option<ServoUrl> { fn strip_url_for_use_as_referrer(mut url: ServoUrl, origin_only: bool) -> Option<ServoUrl> {
const MAX_REFERRER_URL_LENGTH: usize = 4096; const MAX_REFERRER_URL_LENGTH: usize = 4096;
if referrer_url.scheme() == "https" || referrer_url.scheme() == "http" { // Step 2
{ if url.is_local_scheme() {
let referrer = referrer_url.as_mut_url();
referrer.set_username("").unwrap();
referrer.set_password(None).unwrap();
referrer.set_fragment(None);
// Limit `referer` header's value to 4k <https://github.com/w3c/webappsec-referrer-policy/pull/122>
if origin_only || referrer.as_str().len() > MAX_REFERRER_URL_LENGTH {
referrer.set_path("");
referrer.set_query(None);
}
}
return Some(referrer_url);
}
return None; return None;
} }
// Step 3-6
{
let url = url.as_mut_url();
url.set_username("").unwrap();
url.set_password(None).unwrap();
url.set_fragment(None);
// Note: The result of serializing referrer url should not be
// greater than 4096 as specified in Step 6 of
// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer
if origin_only || url.as_str().len() > MAX_REFERRER_URL_LENGTH {
url.set_path("");
url.set_query(None);
}
}
// Step 7
Some(url)
}
/// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin>
fn same_origin(referrer_url: ServoUrl, current_url: ServoUrl) -> Option<ServoUrl> {
// Step 1
if referrer_url.origin() == current_url.origin() {
return strip_url_for_use_as_referrer(referrer_url, false);
}
// Step 2
None
}
/// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin>
fn origin_when_cross_origin(referrer_url: ServoUrl, current_url: ServoUrl) -> Option<ServoUrl> {
// Step 1
if referrer_url.origin() == current_url.origin() {
return strip_url_for_use_as_referrer(referrer_url, false);
}
// Step 2
strip_url_for_use_as_referrer(referrer_url, true)
}
/// <https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer> /// <https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer>
/// Steps 4-6. pub fn determine_requests_referrer(
pub fn determine_request_referrer(
headers: &mut HeaderMap,
referrer_policy: ReferrerPolicy, referrer_policy: ReferrerPolicy,
referrer_source: ServoUrl, referrer_source: ServoUrl,
current_url: ServoUrl, current_url: ServoUrl,
https_state: HttpsState,
) -> Option<ServoUrl> { ) -> Option<ServoUrl> {
assert!(!headers.contains_key(header::REFERER));
// FIXME(#14505): this does not seem to be the correct way of checking for
// same-origin requests.
let cross_origin = referrer_source.origin() != current_url.origin();
match referrer_policy { match referrer_policy {
ReferrerPolicy::NoReferrer => None, ReferrerPolicy::NoReferrer => None,
ReferrerPolicy::Origin => strip_url(referrer_source, true), ReferrerPolicy::Origin => strip_url_for_use_as_referrer(referrer_source, true),
ReferrerPolicy::SameOrigin => { ReferrerPolicy::UnsafeUrl => strip_url_for_use_as_referrer(referrer_source, false),
if cross_origin { ReferrerPolicy::StrictOrigin => strict_origin(referrer_source, current_url),
None
} else {
strip_url(referrer_source, false)
}
},
ReferrerPolicy::UnsafeUrl => strip_url(referrer_source, false),
ReferrerPolicy::OriginWhenCrossOrigin => strip_url(referrer_source, cross_origin),
ReferrerPolicy::StrictOrigin => strict_origin(referrer_source, current_url, https_state),
ReferrerPolicy::StrictOriginWhenCrossOrigin => { ReferrerPolicy::StrictOriginWhenCrossOrigin => {
strict_origin_when_cross_origin(referrer_source, current_url, https_state) strict_origin_when_cross_origin(referrer_source, current_url)
},
ReferrerPolicy::SameOrigin => same_origin(referrer_source, current_url),
ReferrerPolicy::OriginWhenCrossOrigin => {
origin_when_cross_origin(referrer_source, current_url)
}, },
ReferrerPolicy::NoReferrerWhenDowngrade => { ReferrerPolicy::NoReferrerWhenDowngrade => {
no_referrer_when_downgrade_header(referrer_source, current_url, https_state) no_referrer_when_downgrade(referrer_source, current_url)
}, },
} }
} }

View file

@ -29,14 +29,14 @@ use ipc_channel::router::ROUTER;
use msg::constellation_msg::TEST_PIPELINE_ID; use msg::constellation_msg::TEST_PIPELINE_ID;
use net::cookie::Cookie; use net::cookie::Cookie;
use net::cookie_storage::CookieStorage; use net::cookie_storage::CookieStorage;
use net::http_loader::determine_request_referrer; use net::http_loader::determine_requests_referrer;
use net::resource_thread::AuthCacheEntry; use net::resource_thread::AuthCacheEntry;
use net::test::replace_host_table; use net::test::replace_host_table;
use net_traits::request::{ use net_traits::request::{
BodyChunkRequest, BodyChunkResponse, BodySource, CredentialsMode, Destination, Referrer, BodyChunkRequest, BodyChunkResponse, BodySource, CredentialsMode, Destination, Referrer,
RequestBody, RequestBuilder, RequestMode, RequestBody, RequestBuilder, RequestMode,
}; };
use net_traits::response::{HttpsState, ResponseBody}; use net_traits::response::ResponseBody;
use net_traits::{CookieSource, NetworkError, ReferrerPolicy}; use net_traits::{CookieSource, NetworkError, ReferrerPolicy};
use servo_url::{ImmutableOrigin, ServoUrl}; use servo_url::{ImmutableOrigin, ServoUrl};
use std::collections::HashMap; use std::collections::HashMap;
@ -1447,22 +1447,13 @@ fn test_origin_set() {
} }
#[test] #[test]
fn test_determine_request_referrer_shorter_than_4k() { fn test_determine_requests_referrer_shorter_than_4k() {
let mut headers = HeaderMap::new(); let url_str = "http://username:password@example.com/such/short/referer?query#fragment";
let referrer_source = ServoUrl::parse(url_str).unwrap();
let referrer_source =
ServoUrl::parse("http://username:password@example.com/such/short/referer?query#fragment")
.unwrap();
let current_url = ServoUrl::parse("http://example.com/current/url").unwrap(); let current_url = ServoUrl::parse("http://example.com/current/url").unwrap();
let referrer_policy = ReferrerPolicy::UnsafeUrl;
let referer = determine_request_referrer( let referer = determine_requests_referrer(referrer_policy, referrer_source, current_url);
&mut headers,
ReferrerPolicy::UnsafeUrl,
referrer_source,
current_url,
HttpsState::None,
);
assert_eq!( assert_eq!(
referer.unwrap().as_str(), referer.unwrap().as_str(),
@ -1471,23 +1462,16 @@ fn test_determine_request_referrer_shorter_than_4k() {
} }
#[test] #[test]
fn test_determine_request_referrer_longer_than_4k() { fn test_determine_requests_referrer_longer_than_4k() {
let long_url_str = format!( let long_url_str = format!(
"http://username:password@example.com/such/{}/referer?query#fragment", "http://username:password@example.com/such/{}/referer?query#fragment",
"long".repeat(1024) "long".repeat(1024)
); );
let mut headers = HeaderMap::new();
let referrer_source = ServoUrl::parse(&long_url_str).unwrap(); let referrer_source = ServoUrl::parse(&long_url_str).unwrap();
let current_url = ServoUrl::parse("http://example.com/current/url").unwrap(); let current_url = ServoUrl::parse("http://example.com/current/url").unwrap();
let referrer_policy = ReferrerPolicy::UnsafeUrl;
let referer = determine_request_referrer( let referer = determine_requests_referrer(referrer_policy, referrer_source, current_url);
&mut headers,
ReferrerPolicy::UnsafeUrl,
referrer_source,
current_url,
HttpsState::None,
);
assert_eq!(referer.unwrap().as_str(), "http://example.com/"); assert_eq!(referer.unwrap().as_str(), "http://example.com/");
} }

View file

@ -2370,10 +2370,10 @@ impl GlobalScope {
} }
// Substep 3.1.4 // Substep 3.1.4
return Referrer::Client(url); Referrer::Client(url)
} else { } else {
// Substep 3.2 // Substep 3.2
return Referrer::Client(self.get_url()); Referrer::Client(self.get_url())
} }
} }

View file

@ -97,6 +97,12 @@ impl ServoUrl {
scheme == "https" || scheme == "wss" scheme == "https" || scheme == "wss"
} }
/// <https://fetch.spec.whatwg.org/#local-scheme>
pub fn is_local_scheme(&self) -> bool {
let scheme = self.scheme();
scheme == "about" || scheme == "blob" || scheme == "data"
}
pub fn is_chrome(&self) -> bool { pub fn is_chrome(&self) -> bool {
self.scheme() == "chrome" self.scheme() == "chrome"
} }
@ -169,7 +175,21 @@ impl ServoUrl {
Ok(Self::from_url(Url::from_file_path(path)?)) Ok(Self::from_url(Url::from_file_path(path)?))
} }
// https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy /// <https://w3c.github.io/webappsec-secure-contexts/#potentially-trustworthy-url>
pub fn is_potentially_trustworthy(&self) -> bool {
// Step 1
if self.as_str() == "about:blank" || self.as_str() == "about:srcdoc" {
return true;
}
// Step 2
if self.scheme() == "data" {
return true;
}
// Step 3
self.is_origin_trustworthy()
}
/// <https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy>
pub fn is_origin_trustworthy(&self) -> bool { pub fn is_origin_trustworthy(&self) -> bool {
// Step 1 // Step 1
if !self.origin().is_tuple() { if !self.origin().is_tuple() {

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -0,0 +1,37 @@
[xhr.http.html]
[Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL

View file

@ -11,18 +11,12 @@
[Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL

View file

@ -1,7 +1,25 @@
[xhr.http.html] [xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.] [Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.] [Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL expected: FAIL

View file

@ -11,18 +11,12 @@
[Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -0,0 +1,37 @@
[xhr.http.html]
[Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL

View file

@ -11,18 +11,12 @@
[Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL

View file

@ -1,7 +1,25 @@
[xhr.http.html] [xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.] [Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.] [Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL expected: FAIL

View file

@ -11,18 +11,12 @@
[Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.] [Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,7 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[xhr.http.html]
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL