Commit Graph

79 Commits

Author SHA1 Message Date
Tim Huang
6fd55bd41e Bug 1319773 - Part 3: Making the WrapperFactory ignores the First Party Domain of the originAttributes when rewrapping the wrapper. r=mrbkap 2017-01-18 20:34:31 +08:00
Boris Zbarsky
02f5d54849 Bug 1335654 part 3. Implement actually throwing a SecurityError when cross-origin property accesses are denied. r=bholley 2017-02-02 12:48:49 -05:00
Boris Zbarsky
ce8191abab Bug 1335654 part 2. Change the deny() methods of our wrapper security policies to take a JSContext and a mayThrow boolean. r=bholley 2017-02-02 12:48:49 -05:00
Birunthan Mohanathas
a29151dc87 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Jan de Mooij
c6596c5fa8 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 23:22:11 +01:00
Phil Ringnalda
1a1c158706 Backed out changeset 0c030f97a04f (bug 1144366) for being on top of patches being backed out
CLOSED TREE
2015-03-28 10:39:56 -07:00
Jan de Mooij
369ef1b850 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 12:08:37 +01:00
Bobby Holley
dc53be8b85 Bug 1081985 - Remove prototype remapping and make COWs simple. r=gabor
\o/
2014-10-20 15:52:53 +02:00
Bobby Holley
2d41b4d59e Bug 1081990 - Turn off COWs for Functions. r=gabor 2014-10-18 11:02:10 +02:00
Bobby Holley
122b87472f Bug 1081990 - Generalize CheckPassToChrome machinery to operate on call/construct for all FilteringWrappers. r=gabor 2014-10-18 11:02:10 +02:00
Bobby Holley
d7d2365487 Bug 1081990 - Give all non-COW filtering wrappers a null proto. r=gabor 2014-10-18 11:02:10 +02:00
Bobby Holley
ccb21ffa2b Bug 1083060 - Refactor the XOW access control code to use an enum rather than a char*. r=bz
Srsly.
2014-10-17 16:17:02 +02:00
Bobby Holley
342d0710f0 Bug 1065185 - Expand XrayWrapper console messages for COWs. r=bz 2014-10-03 10:05:51 +02:00
Bobby Holley
be4629aef4 Bug 965898 - Handleify more stuff. r=me 2014-07-30 12:23:04 -07:00
Bobby Holley
010d1c0e0a Bug 965898 - Switch policies for get{,Own}PropertyDescriptor. r=gabor 2014-07-30 12:23:03 -07:00
Bobby Holley
24a6a77567 Backed out 16 changesets (bug 965898) for rooting hazards. CLOSED TREE
Backed out changeset ac4abde3579f (bug 965898)
Backed out changeset c4c7ab1a2f70 (bug 965898)
Backed out changeset e0bf3598dfe1 (bug 965898)
Backed out changeset 8f2788a0ba24 (bug 965898)
Backed out changeset 0d1cda4decaa (bug 965898)
Backed out changeset 3d80ffc439fb (bug 965898)
Backed out changeset ad66ab36fe2d (bug 965898)
Backed out changeset dcf7ccf6eff2 (bug 965898)
Backed out changeset d3f02e80355d (bug 965898)
Backed out changeset 212f2d05d9e7 (bug 965898)
Backed out changeset c350a2c0aa6d (bug 965898)
Backed out changeset c75acd0663a9 (bug 965898)
Backed out changeset d68f7ef0ae69 (bug 965898)
Backed out changeset 610e6d6e1a88 (bug 965898)
Backed out changeset 54d40a30f6ad (bug 965898)
Backed out changeset 403a0e1d2324 (bug 965898)
2014-07-29 22:57:59 -07:00
Bobby Holley
4ed05f74bb Bug 965898 - Switch policies for get{,Own}PropertyDescriptor. r=gabor 2014-07-29 21:35:32 -07:00
Bobby Holley
bc09c8bbda Bug 1034239 - Replace GentlyOpaque with an "Xray-to-nothing" wrapper. r=gabor
I did this wrong before. Making this a SecurityWrapper means that the caller does
not subsumes the target, and that the target therefore needs to be protected
from the caller. But GentlyOpaque was supposed to be an analog of PermissiveXray
for use when no useful XrayTraits exist, so it should behave similarly.

If we make this a Filtering Security Wrapper, we get a bunch of assertions where we
expect CheckedUnwrap to succeed for a chrome-side wrapper. And we can't making it
a Filtering Non-Security Wrapper, because then the filtering policy isn't even
consulted (an optimization in jsproxy.cpp).

Really, we want all of the Xray machinery (like the ability to waive and to place
expandos), and we just don't want to resolve any properties. This patch does this.
2014-07-10 09:31:37 -07:00
Bobby Holley
6ed71580db Bug 987163 - Drop special COW support for TypedArrays. r=gabor
From now on, if someone wants to expose a TypedArray to content, they should
use Cu.cloneInto.
2014-06-17 10:16:08 -07:00
Julien Levesy
acddabe24e Bug 1006692 - Replaced nsScriptSecurityManager::SubjectIsPrivileged and AccessCheck::IsCallerChrome by nsContentUtils::IsCallerChrome. r=bholley 2014-05-19 13:39:00 +02:00
Birunthan Mohanathas
56da97da22 Bug 866289 - Make mode lines consistent in js/xpconnect/ for 4 space indented files. r=Ms2ger 2014-04-03 07:58:00 -04:00
Bobby Holley
60d1981574 Bug 825392 - Remove SOWs. r=bz 2014-03-19 13:35:45 -03:00
Bobby Holley
83dfd7826d Bug 976704 - Make opaque security wrappers non-callable. r=gabor,sr=mrbkap 2014-03-18 19:23:45 -03:00
Bobby Holley
518ec04b50 Bug 956382 - Remove usage of explicit *IgnoringDomain variants. r=mrbkap 2014-02-13 18:57:36 -08:00
Bobby Holley
9cbbe11542 Bug 956382 - Add AccessCheck::subsumesConsideringDomain and clean up other implementations. r=mrbkap
We now assert that we have a principal when we enter the wrap callback, and we
now have a convenient overload defined in nsIPrincipal.idl.
2014-02-13 18:57:34 -08:00
Bobby Holley
3078a4ce84 Bug 965901 - Add an ENUMERATE policy action. r=gabor sr=mrbkap 2014-02-13 10:54:08 -08:00
Bobby Holley
caa236cfd2 Bug 951948 - Remove Components wrappers. r=mrbkap
We fix up the tests here to test the new behavior, and fix some bugs in the test
while we're at it.
2014-01-14 18:49:30 -08:00
Nicholas Nethercote
b6c8382360 Bug 912411 (part 2) - Move JSID_{VOID,EMPTY}HANDLE from jsapi.{h,cpp} to Id.{h,cpp}. r=luke. 2013-09-05 16:08:57 -07:00
Nicholas Nethercote
738ad9d23b Bug 910109 (part 2) - Make jswrapper.h not depend on jsapi.h. r=luke. 2013-08-28 17:24:34 -07:00
Nicholas Nethercote
9fc605b8f3 Bug 905017 (part 1) - Minimize inclusions of JS engine headers in .h and .idl files. r=billm. 2013-08-17 15:50:18 -07:00
Jon Coppeard
00ee61515b Bug 885310 - 2 Rename JSHandleFoo in js directory r=bholley 2013-06-21 14:12:46 +01:00
Bobby Holley
b438c55ffa Bug 862380 - Silently fail for enumerate-like operations on XOWs. r=mrbkap 2013-05-22 22:27:15 -06:00
Bobby Holley
e2c1a83b82 Bug 862380 - Pass the entered id in addition to the wrapper action to Policy::deny. r=mrbkap 2013-05-22 22:27:15 -06:00
Nathan Froyd
03ce9169ad Bug 871595 - don't include WrapperFactory.h in AccessCheck.h; r=bholley 2013-05-13 12:04:23 -04:00
Bobby Holley
b9fadef9b8 Bug 834707 - Kill dynamic SOWs. r=gabor
Now that XBL scopes are here to stay (no more pref), we can remove all the
machinery that makes SOWs dynamic. We still need SOWs until bug 825392 is
fixed, but they can now be totally opaque.

One side effect of this patch is that, due to our usage of Opaque, we now
allow CALL on SOWs. But this shouldn't be a problem, because SOWs are used
for anonymous elements which are not callable (and we probably wouldn't mind
it even if they were).
2013-05-06 19:38:23 -07:00
Bobby Holley
2af05152f5 Bug 843829 - Wrap unwaived content JS objects in opaque wrappers for XBL scopes. r=mrbkap 2013-04-03 11:41:23 -07:00
Ehsan Akhgari
8a4fa2e393 Backed out 6 changesets (bug 843829, bug 845862) because of broken mochitest-5
Backed out changeset 1df3bdadb7ce (bug 843829)
Backed out changeset 64f001fe04fb (bug 843829)
Backed out changeset 57652d8f0827 (bug 843829)
Backed out changeset 2e889cd77a48 (bug 843829)
Backed out changeset 97d16e7beb27 (bug 843829)
Backed out changeset 6c6ab0e54917 (bug 845862)

Landed on a CLOSED TREE
2013-04-02 23:05:48 -04:00
Bobby Holley
4a2b491ba9 Bug 843829 - Wrap unwaived content JS objects in opaque wrappers for XBL scopes. r=mrbkap 2013-04-02 18:51:20 -07:00
Bobby Holley
e2e5fa0ca3 Bug 854480 - Remove SCRIPT_ACCESS_ONLY. r=mrbkap 2013-04-01 15:17:51 -07:00
Bobby Holley
19ea74e50b Bug 658909 - Make isSafeToUnwrap pseudo-dynamic for SOWs. r=mrbkap
This can go away as soon as XBL scopes are no longer behind a pref.
2013-03-21 08:20:41 -07:00
Ryan VanderMeulen
736320d2fd Backed out 22 changesets (bug 658909) for Windows debug bustage. 2013-03-21 15:24:54 -04:00
Bobby Holley
8dd1010edf Bug 658909 - Make isSafeToUnwrap pseudo-dynamic for SOWs. r=mrbkap
This can go away as soon as XBL scopes are no longer behind a pref.
2013-03-21 08:20:41 -07:00
Ms2ger
d16578178b Backout bug 658909 for Marionette bustage. 2013-03-17 10:44:33 +01:00
Bobby Holley
222b05b45c Bug 658909 - Make isSafeToUnwrap pseudo-dynamic for SOWs. r=mrbkap
This can go away as soon as XBL scopes are no longer behind a pref.
2013-03-16 22:58:13 -07:00
Bobby Holley
437a0a3edf Bug 836301 - Introduce an RAII class for entering policies. r=mrbkap
This will allow us to make some hard assertions that a given policy has been
entered exactly once.
2013-02-25 13:54:18 -08:00
Phil Ringnalda
b01d7591f9 Back out 4d301b2bcad0:e0632e639097 (bug 836301) for Windows build bustage
CLOSED TREE
2013-02-22 08:41:37 -08:00
Bobby Holley
d265a08311 Bug 836301 - Introduce an RAII class for entering policies. r=mrbkap
This will allow us to make some hard assertions that a given policy has been
entered exactly once.
2013-02-22 08:14:33 -08:00
Bobby Holley
55b30b5d60 Bug 823348 - Make NNXOWs use an explicitly opaque Policy. r=mrbkap
There's no reason to be doing a dynamic check here, given that the JSClasses
will never match. Lets be explicit and safe.
2013-01-23 06:04:38 +01:00
Bobby Holley
b60d7375ce Bug 809652 - Deny nativeCall for SecurityWrapper except under specific circumstances. r=jorendorff 2012-12-20 22:33:26 -08:00
Bobby Holley
c602a1cd62 Bug 818716 - Move XBL detection into nsContentUtils and remove filename hack. r=mrbkap 2012-12-12 17:09:37 -08:00