Last Comment Bug 763496 - Using nsIPrincipal::Subsumes instead of nsIPrincipal::Equals in nsDocShell
: Using nsIPrincipal::Subsumes instead of nsIPrincipal::Equals in nsDocShell
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Document Navigation (show other bugs)
: unspecified
: x86_64 Windows 7
: -- normal (vote)
: mozilla16
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-11 08:06 PDT by Gabor Krizsanits [:krizsa :gabor]
Modified: 2012-06-13 05:59 PDT (History)
4 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Using nsIPrincipal::Subsumes instead of nsIPrincipal::Equals in nsDocShell (1.02 KB, patch)
2012-06-11 23:57 PDT, Gabor Krizsanits [:krizsa :gabor]
bzbarsky: review+
Details | Diff | Splinter Review

Description Gabor Krizsanits [:krizsa :gabor] 2012-06-11 08:06:50 PDT
After inventing nsExpandedPrincipal in bug 734891 it can cause some issues with it that at various places of the platform there is Equals used for security checked where conceptually Subsumes should be. 

One of it is in nsDocShell the bug was reported here: https://bugzilla.mozilla.org/show_bug.cgi?id=734891#c86
Comment 1 Boris Zbarsky [:bz] 2012-06-11 08:40:05 PDT
Which actual callsite in docshell is this?
Comment 2 Gabor Krizsanits [:krizsa :gabor] 2012-06-11 11:23:04 PDT
(In reply to Boris Zbarsky (:bz) from comment #1)
> Which actual callsite in docshell is this?

http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDocShell.cpp#7932

And thanks for putting the bug into the right place, I was wondering where to file it.
Comment 3 Boris Zbarsky [:bz] 2012-06-11 12:01:43 PDT
Ah, yes.  That should totally be Subsumes.
Comment 4 Gabor Krizsanits [:krizsa :gabor] 2012-06-11 23:57:51 PDT
Created attachment 632149 [details] [diff] [review]
Using nsIPrincipal::Subsumes instead of nsIPrincipal::Equals in nsDocShell

https://tbpl.mozilla.org/?tree=Try&rev=1d034734aa86
Comment 5 Bobby Holley (:bholley) (busy with Stylo) 2012-06-12 01:56:33 PDT
Comment on attachment 632149 [details] [diff] [review]
Using nsIPrincipal::Subsumes instead of nsIPrincipal::Equals in nsDocShell

To clarify, I'm not a peer here.
Comment 6 Boris Zbarsky [:bz] 2012-06-12 12:29:37 PDT
Comment on attachment 632149 [details] [diff] [review]
Using nsIPrincipal::Subsumes instead of nsIPrincipal::Equals in nsDocShell

r=me
Comment 7 Ryan VanderMeulen [:RyanVM] 2012-06-12 14:10:26 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/7612eef1ed3a
Comment 8 Ed Morley [:emorley] 2012-06-13 05:59:08 PDT
https://hg.mozilla.org/mozilla-central/rev/7612eef1ed3a

Note You need to log in before you can comment on or make changes to this bug.