Opened 6 years ago

Closed 6 years ago

#13784 closed defect (fixed)

HTTP authentication tokens are not removed anymore for third party requests

Reported by: gk Owned by: tbb-team
Priority: Very High Milestone:
Component: Applications/Tor Browser Version:
Severity: Keywords: tbb-linkability, tbb-testcase, TorBrowserTeam201412
Cc: mikeperry Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by gk)

Fixing #13742 broke stripping off the Authorization header in case we are about to send it with third party requests. The relevant code in stanford-safecache.js was:

      try {
        // Disable 3rd party http auth, but exempt the browser (for favicon loads)
        // FIXME: Hrmm, this is just going to disable auth for 3rd party domains.
        // It would be better if we could isolate the auth, but still
        // allow it to be transmitted.. But I guess, who still uses http auth anyways?
        if (channel.getRequestHeader("Authorization") !== null) {
          if (parent_spec == "chrome://browser/content/browser.xul") {
            torbutton_log(3, "Allowing auth for browser load of "+channel.URI.spec);
          } else {
            torbutton_safelog(4, "Removing 3rd party HTTP auth for url ",
                              channel.URI.spec+", parent: "+parent_spec);
            channel.setRequestHeader("Authorization", null, false);
            channel.setRequestHeader("Pragma", null, false);
            channel.setRequestHeader("Cache-Control", null, false);
      } catch (e) {}

This is not an issue in our current stable but we need to get that fixed rather soon as we want to backport the fix for #13742 to our 4.0 series.

Child Tickets

Change History (3)

comment:1 Changed 6 years ago by gk

Description: modified (diff)

comment:2 Changed 6 years ago by mikeperry

Keywords: TorBrowserTeam201412 added; TorBrowserTeam201411 removed

comment:3 Changed 6 years ago by gk

Resolution: fixed
Status: newclosed

This is fixed in the alpha series but due to lack of time by reverting the respective Torbutton commits. (I did not feel comfortable at all to ship 4.5-alpha-2 with such an issue unfixed) The ticket for the proper patch is #13900.

Note: See TracTickets for help on using tickets.