Closed Bug 1277299 Opened 4 years ago Closed 4 years ago

Replace getSimpleCodebasePrincipal with createCodebasePrincipal (Thunderbird Part)

Categories

(Thunderbird :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 49.0

People

(Reporter: philip.chee, Assigned: philip.chee)

References

()

Details

Attachments

(1 file)

https://hg.mozilla.org/mozilla-central/rev/62903b5a04a7

(Jonas Sicking (:sicking) from Bug 1259871 comment #13)
> We mainly created getSimpleCodebasePrincipal so that we could add assertions
> to make sure that such principals were never used to look up permissions or
> localStorage/IndexedDB data.
> 
> I.e. we did it to try to find code that created principals without passing
> in the correct appid when the appid really mattered.
> 
> This was especially important since appid was a FirefoxOS-only thing, so not
> something that we expected Gecko engineers to care about or do correctly.
> 
> Since OriginAttributes are used by Firefox, I think we have a much larger
> chance of getting them used correctly.
> 
> So yeah, I think we should replace createSimpleCodebasePrincipal with
> createCodebasePrincipal using default OriginAttributes. Though we might want
> to audit the callers to see if we should pass in a non-default
> OriginAttribute.
> 
> Probably good to get Huseby to look at these patches since he's audited a
> lot of createCodebasePrincipal callers to see if they need to use
> non-default OriginAttributes.
Attachment #8758784 - Flags: review?(mkmelin+mozilla)
Comment on attachment 8758784 [details] [diff] [review]
Bug1277299getSimpleCodebasePrincipalTB.patch

Review of attachment 8758784 [details] [diff] [review]:
-----------------------------------------------------------------

Thx! r=mkmelin
Attachment #8758784 - Flags: review?(mkmelin+mozilla) → review+
http://hg.mozilla.org/comm-central/rev/a68b9dd79594
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 49.0
You need to log in before you can comment on or make changes to this bug.