Closed Bug 1950058 Opened 6 months ago Closed 5 months ago

Clear-Site-Data: "cache": Use principal with correct originAttributes

Categories

(Toolkit :: Data Sanitization, defect, P2)

defect

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: manuel, Assigned: manuel)

References

Details

(Keywords: priv-triaged)

Attachments

(1 file)

Currently we pass a principal that has unpartitioned originAttributes. This leads to clearing the wrong cache entries. Identify how to pass a principal with the correct originAttributes or modify the originAttributes in the clearOrigin cache function.

setting a severity since this is a defect

Severity: N/A → S3
Keywords: priv-triaged

Note from talking to Tim yesterday: The originAttributes seem correct. However, we also pass the origin to CacheStorageService::ClearOriginInternal and that is likely not honored correctly.

This patch contains basically three fixes and could be split up into
three commits if preferred.

Fix 1: The originAttributes coming from predictor code didn't adjust
OriginAttributes for networking state. Therefore, both unpartitioned and
partitioned cache entries were written. This was fixed on the caller
side. It might make sense to do this on the callee side.

Fix 2: The originAttributes coming from Clear-Site-Data: "cache" code
didn't adjust the OriginAttributes for clearing for networking state.

Fix 3: The partitionKey PopulateTopLevelInfoFromURI didn't include the
port in some cases.

See Also: → 1951466
Assignee: nobody → manuel
Attachment #9468666 - Attachment description: WIP: Bug 1950058 - Fix originAttributes for cache from predictor, clear-site-data and when using non-standard ports → Bug 1950058 - Fix originAttributes passed on Clear-Site-Data: "cache" to clearer r=#anti-tracking
Status: NEW → ASSIGNED
Attachment #9468666 - Attachment description: Bug 1950058 - Fix originAttributes passed on Clear-Site-Data: "cache" to clearer r=#anti-tracking → Bug 1950058 - Fix network cache cleaning from `Clear-Site-Data: "cache"` header r=#anti-tracking
Pushed by mbucher@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/988a49f32591 Fix network cache cleaning from `Clear-Site-Data: "cache"` header r=anti-tracking-reviewers,timhuang
Blocks: 1930500
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
See Also: → 1956789
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: