From faec3a50ea181f322ab9819975e285ced34a0308 Mon Sep 17 00:00:00 2001 From: Jochen Eisinger Date: Fri, 19 Feb 2016 12:49:41 +0100 Subject: [PATCH] Never send a referrer with hyperlink auditing pings For same-origin pings, a ping request with a referrer might be mistaken as a trustable POST. We already don't include a referrer if the document containing the anchor is secure. Stripping the referrer for insecure, cross-origin pings makes the whole algorithm easier. PR: https://github.com/whatwg/html/pull/712 --- source | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/source b/source index bcbcc5bf582..ee6aa94cf6f 100644 --- a/source +++ b/source @@ -21133,7 +21133,8 @@ interface HTMLHyperlinkElementUtils { the Document containing the hyperlink, destination is "subresource", credentials mode is "include", and whose use-URL-credentials flag is set.

+ data-x="">include", referrer is "no-referrer", and whose use-URL-credentials flag is set.

  • Let target URL is the resulting URL string obtained from HTMLHyperlinkElementUtils {

    request must include a `Ping-From` header with, as its value, the address of the document containing the hyperlink, and a `Ping-To` HTTP header with, - as its value, the target URL. request's referrer must be "no-referrer". -
    + as its value, the target URL. +
    Otherwise, if the origins are different, but the document containing the hyperlink being audited was not retrieved over an encrypted connection
    -
    request's referrer must be the - address of the document containing the hyperlink. - request must include a `Ping-From` header with - the same value, and a `Ping-To` HTTP header with, as its - value, target URL.
    +
    The request must include a `Ping-From` + header with the address of the document containing + the hyperlink as its value, and a `Ping-To` HTTP header + with, as its value, target URL.
    Otherwise, the origins are different and the document containing the hyperlink being audited was retrieved over an encrypted connection
    request must include a `Ping-To` HTTP header - with, as its value, target URL. request's referrer must be "no-referrer". - request does not include a `Ping-From` header.
    + with, as its value, target URL. request does not + include a `Ping-From` header. - -

    These headers should be subject to Referrer - Policy.

  • Fetch request.