Closed Bug 1670820 Opened 6 years ago Closed 5 years ago

HSTS cache not working for subresources when privacy.partition.network_state=true

Categories

(Core :: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox83 --- fixed
firefox84 --- fixed

People

(Reporter: arthur, Assigned: timhuang)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

I ran into a possible incorrect behavior when I tried to test HSTS isolation when privacy.partition.network_state is enabled:

Steps to reproduce

Expected result

The image, http://hsts.arthuredelstein.net/test_hsts.png, should be upgraded to HTTPS and successfully loaded.

Actual result

The image fails to load because the load is not upgraded to HTTPS. Somehow the HSTS state for hsts.arthuredelstein.net is not being respected for subresources under the same first party (arthuredelstein.net).

Assignee: nobody → tihuang

The partitionKey for HSTS is always set with 'http' scheme. So, we
should also use 'http' when checking the HSTS for http channels.

Depends on D93392

Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aa0bd6004405 Part 1: Add a test case to ensure the HSTS of subresources is partitioned. r=baku https://hg.mozilla.org/integration/autoland/rev/a5eee5b5c9e6 Part 2: Use the StoragePrincipalHelper::GetOriginAttributesForHSTS() to get the OA when checking the HSTS for http channels. r=baku,necko-reviewers,dragana
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch

Comment on attachment 9181341 [details]
Bug 1670820 - Part 1: Add a test case to ensure the HSTS of subresources is partitioned. r?baku

Beta/Release Uplift Approval Request

  • User impact if declined: The HSTS won't work on subresources in early beta because we have enabled the network partitioning in early beta.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It's just a one-line change. And we have a test for it. So, the risk should be low.
  • String changes made/needed:
Attachment #9181341 - Flags: approval-mozilla-beta?
Attachment #9181342 - Flags: approval-mozilla-beta?

Comment on attachment 9181341 [details]
Bug 1670820 - Part 1: Add a test case to ensure the HSTS of subresources is partitioned. r?baku

P2, low risk, EARLY_BETA only and has tests, approved for 83 beta 84, thanks.

Attachment #9181341 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9181342 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: