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

Password gets shown in view-source URL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.11.0 Beta 3
    • 5.10.0
    • WebEngine
    • None
    • 789f375411b542db3ac3be79cbe0a6153720abf1

      Using the ViewSource action on e.g. http://user:passwd@httpbin.org/basic-auth/user/passwd opens a view-source:http://user:passwd@httpbin.org/basic-auth/user/passwd URL.

      Since the path of that new URL is set to the original URL, calling toDisplayString() on it will include the user and password.

      In Chromium, using "view source" on the same page opens the URL view-source:http://httpbin.org/basic-auth/user/passwd with that not displayed. I'm not sure if it's needed internally to get the source though - it doesn't seem to be stripped out when the URL is created (probably only when displayed?).

      When opening http://user:passwd@httpbin.org/basic-auth/user/passwd and then opening view-source:http://httpbin.org/basic-auth/user/passwd by hand it seems to work fine without asking for credentials, so QtWebEngine should probably just strip that out when constructing the URL.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            pvarga Peter Varga
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes