Closed Bug 1687314 Opened 4 years ago Closed 3 years ago

Investigate how to handle NullPrincipal in StoragePrincipalHelper::Create

Categories

(Core :: Privacy: Anti-Tracking, task, P3)

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: emz, Assigned: emz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If we get a NullPrincipal in StoragePrincipalHelper::Create the call to clone the principal here: https://searchfox.org/mozilla-central/rev/dac45cc7020dfddbcc937827810dd11550c07dc3/toolkit/components/antitracking/StoragePrincipalHelper.cpp#109-110 will return a nullptr. It doesn't set any error code for this case.

This is returned by getChannelResultStoragePrincipal: https://searchfox.org/mozilla-central/rev/dac45cc7020dfddbcc937827810dd11550c07dc3/caps/nsIScriptSecurityManager.idl#231

The behavior is a bit unexpected, because getChannelResultPrincipal will return the NullPrincipal instead of a nullptr.
We should investigate how to handle NullPrincipal and try to align the behavior.

Priority: -- → P3
Blocks: dfpi-hq
Assignee: nobody → pbz
Status: NEW → ASSIGNED
See Also: → 1686938
Pushed by pzuhlcke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fef56f826d64 Improve behavior of GetChannelResultStoragePrincipal and StoragePrincipalHelper::Create when handling NullPrincipal. r=timhuang
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: