Changeset 280342 in webkit


Ignore:
Timestamp:
Jul 27, 2021 10:20:54 AM (12 months ago)
Author:
commit-queue@webkit.org
Message:

document.referrer value is missing trailing slash
https://bugs.webkit.org/show_bug.cgi?id=215080

Patch by Alex Christensen <achristensen@webkit.org> on 2021-07-27
Reviewed by John Wilander.

Source/WebCore:

This matches the behavior of Chrome and Firefox.
The solution is similar to that of bug 227795.
Covered by a few layout tests.

  • dom/Document.cpp:

(WebCore::Document::referrer):

LayoutTests:

  • http/tests/resourceLoadStatistics/downgrade-document-referrer-nested-third-party-iframe-expected.txt:
  • http/tests/resourceLoadStatistics/downgrade-document-referrer-third-party-iframe-expected.txt:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r280340 r280342  
     12021-07-27  Alex Christensen  <achristensen@webkit.org>
     2
     3        document.referrer value is missing trailing slash
     4        https://bugs.webkit.org/show_bug.cgi?id=215080
     5
     6        Reviewed by John Wilander.
     7
     8        * http/tests/resourceLoadStatistics/downgrade-document-referrer-nested-third-party-iframe-expected.txt:
     9        * http/tests/resourceLoadStatistics/downgrade-document-referrer-third-party-iframe-expected.txt:
     10
    1112021-07-27  Ayumi Kojima  <ayumi_kojima@apple.com>
    212
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/downgrade-document-referrer-nested-third-party-iframe-expected.txt

    r250676 r280342  
    44
    55
    6 PASS document.referrer is http://127.0.0.1:8000
     6PASS document.referrer is http://127.0.0.1:8000/
    77PASS successfullyParsed is true
    88
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/downgrade-document-referrer-third-party-iframe-expected.txt

    r250676 r280342  
    44
    55
    6 PASS document.referrer is http://127.0.0.1:8000
     6PASS document.referrer is http://127.0.0.1:8000/
    77PASS successfullyParsed is true
    88
  • trunk/Source/WebCore/ChangeLog

    r280337 r280342  
     12021-07-27  Alex Christensen  <achristensen@webkit.org>
     2
     3        document.referrer value is missing trailing slash
     4        https://bugs.webkit.org/show_bug.cgi?id=215080
     5
     6        Reviewed by John Wilander.
     7
     8        This matches the behavior of Chrome and Firefox.
     9        The solution is similar to that of bug 227795.
     10        Covered by a few layout tests.
     11
     12        * dom/Document.cpp:
     13        (WebCore::Document::referrer):
     14
    1152021-07-26  Said Abou-Hallawa  <said@apple.com>
    216
  • trunk/Source/WebCore/dom/Document.cpp

    r280112 r280342  
    52685268            RegistrableDomain referrerRegistrableDomain { referrerURL };
    52695269            if (!referrerRegistrableDomain.matches(securityOrigin().data())) {
    5270                 m_referrerOverride = referrerURL.protocolHostAndPort();
     5270                m_referrerOverride = URL(URL(), referrerURL.protocolHostAndPort()).string();
    52715271                return m_referrerOverride;
    52725272            }
Note: See TracChangeset for help on using the changeset viewer.