Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70790

QWebEngineUrlRequestInfo::firstPartyUrl() returns empty url

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.12.2
    • 5.12.0 Beta 1
    • WebEngine
    • None
    • All
    • c37ee40aa43aac7a717f0e5c24816834cffb2b76 , d2f5d6869f07833bb70cbb1999c5b709f900ba56

    Description

      When intercepting UrlRequest the first party url is empty if the request url and the first party url doesn’t have the same origin.

      It worked before the 69-based update. The issue is triggered by: https://chromium.googlesource.com/chromium/src/+/07fbae50670ea44e35e1d554db1bbece7fe3711f%5E%21/content/browser/frame_host/navigation_request.cc

      The qrc:/ urls work since https://codereview.qt-project.org/#/c/240565/

      The attached example demonstrate the problem (main.cpp): the second url request is triggered by an iframe and the first party url of this request is not available because the local pages do not have the same origin.

      Proposed solution: replace URLRequest::site_for_cookies() usage in network_delegate_qt.cpp because site_for_cookies() is not supposed to work for non-same-origin requests.

      Attachments

        1. content.html
          0.1 kB
          Tamas Zakor
        2. firstparty.html
          0.2 kB
          Tamas Zakor
        3. main.cpp
          2 kB
          Tamas Zakor
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ztamas Tamas Zakor
            ztamas Tamas Zakor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes