Closed Bug 327242 Opened 19 years ago Closed 19 years ago

[FIX] Make nsIPrincipal scriptable so things like CheckLoadURIWithPrincipal are usable from script

Categories

(Core :: Security: CAPS, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file, 1 obsolete file)

The noscript silliness with nsIPrincipal is just that -- silliness, imo. If we don't want script messing with the principal, we should make all the methods and properties noscript instead.
Attached patch Fix (obsolete) (deleted) — Splinter Review
I made most stuff on nsIPrincipal noscript; the exceptions are equals() (which I think should be scriptable for sure) and the certificate stuff (which I think it makes sense to leave scriptable). I'm open to more things being noscript if desired, though.
Attachment #211948 - Flags: superreview?(dveditz)
Attachment #211948 - Flags: review?(jst)
Assignee: dveditz → bzbarsky
Target Milestone: --- → mozilla1.9alpha
Blocks: 327244
Blocks: 147145
Comment on attachment 211948 [details] [diff] [review] Fix If you're going to expose the cert stuff (which is fine) should we also expose the readonly URI for non-cert principals? But then it may be a domain principal, and domain is not readonly. I guess we don't want people to care what's inside a principal. sr=dveditz
Attachment #211948 - Flags: superreview?(dveditz) → superreview+
I do think eventually we may want to expose a scriptable URI, but when we do I want to return a clone. Right now people can get the "readonly" URI and then modify the object; I don't think we want to support that from script. ;)
Attachment #211948 - Flags: review?(jst) → review+
Blocks: JEP/caps
Attached patch Patch that I checked in (deleted) — Splinter Review
Revs the nsIScriptSecurityManager IID too.
Attachment #211948 - Attachment is obsolete: true
Except tree's closed, so I did not in fact check this in yet.
Fixed for real.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: