Closed Bug 1799541 Opened 2 years ago Closed 2 years ago

upgradeToSecure results in https redirect loop

Categories

(Core :: Networking: HTTP, defect, P2)

defect

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox106 --- wontfix
firefox107 --- wontfix
firefox108 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Currently, when upgradeToSecure is returned for a https URL, a redirect loop occurs (and eventually broken when the limit on the number of internal redirects is reached, ~20).

That happens because the flag propagates from here to here, after which an unconditional redirect to the https version of the URL occurs.

What should be happening instead is for the upgrade to be ignored if the request already uses a secure scheme. This used to be the case when introduced in bug 1149250, but was regressed by https://searchfox.org/mozilla-central/diff/50316df2bbad5bd67e490d3e302943ddb5be183e/netwerk/protocol/http/nsHttpChannel.cpp#546 (note the move from the mUpgradeToSecure lookup outside of the isHttp branch).

Set release status flags based on info from the regressing bug 1521729

We are in RC week, wontfix 106.

Could you set a severity on this?
Is this something we need on the radar for a potential 107 ride-along or ride the trains in 108?

Flags: needinfo?(rob)

S4 - extension developers can work around this by checking whether the request URL is "https", and if so skip the result.
This regression went unnoticed for a long while so we can just ride the trains.

Severity: -- → S4
Flags: needinfo?(rob)
Priority: -- → P2
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/aceb2c66669b
Avoid redirect loop when channel.upgradeToSecure is used r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: