Replace getSimpleCodebasePrincipal with createCodebasePrincipal (SeaMonkey Part)

RESOLVED FIXED in seamonkey2.46

Status

defect
RESOLVED FIXED
3 years ago
3 years ago

People

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

Tracking

Trunk
seamonkey2.46
Dependency tree / graph

SeaMonkey Tracking Flags

(seamonkey2.45 unaffected, seamonkey2.46 fixed, seamonkey2.47 fixed, seamonkey2.48 fixed, seamonkey2.49esr fixed)

Details

()

Attachments

(1 attachment)

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.
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Posted patch Proposed fix.Splinter Review
Attachment #8758781 - Flags: review?(iann_bugzilla)
Comment on attachment 8758781 [details] [diff] [review]
Proposed fix.

Looks good to me r/a=me
Attachment #8758781 - Flags: review?(iann_bugzilla) → review+
Sigh. More bitrot Bug 1233899 (fix the feeds converter to use default user context origin attributes)
Depends on: 1233899
http://hg.mozilla.org/comm-central/rev/19210c4ad776
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.47
Comment on attachment 8758781 [details] [diff] [review]
Proposed fix.

[Triage Comment]
a=me for c-r, make sure it goes onto the correct branch (SEA_COMM490_20160927_RELBRANCH I think)
Attachment #8758781 - Flags: approval-comm-release+
Target Milestone: seamonkey2.47 → seamonkey2.46
Blocks: SM2.46
You need to log in before you can comment on or make changes to this bug.