Andrew McCreight
f89c72edb7
Bug 1377587, part 2 - Rename ExposedPropertiesOnly to OpaqueWithSilentFailing. r=krizsa
...
This class doesn't have anything to do with __exposedProps__ any more,
so give it a more descriptive name. We'd still like to remove it
entirely eventually.
MozReview-Commit-ID: 87KCpG6f8rI
--HG--
extra : rebase_source : 98a51a6af0fc8446dbcd8efa083d6c79286279d3
2017-09-07 11:17:16 -07:00
Andrew McCreight
2b68b38709
Bug 1377587, part 1 - Always act like __exposedProps__ is missing. r=krizsa
...
This patch gently removes support for __exposedProps__ by changing
ExposedPropertiesOnly::check() to always return false, while still
failing silently in deny for some kinds of access.
The tests that I changed all involve testing the behavior with
__exposedProps__. I adjusted them to expect it to fail, or to adjust
the error message they get when they fail. That seemed better than
deleting them entirely.
Note that test_bug1065185.html had a bug, so that it never executed
the first case. I fixed that, and then fixed up the test to work when
__exposedProps__ is not supported.
This also removes various bits of the test framework that use
__exposedProps__, but don't actually need to.
MozReview-Commit-ID: 8fvkAmITmXY
--HG--
extra : rebase_source : ef7e2c55adc12511f17f3865ebb46c343875f0b3
2017-08-22 14:24:11 -07:00
Tim Huang
72200b06f7
Bug 1319773 - Part 3: Making the WrapperFactory ignores the First Party Domain of the originAttributes when rewrapping the wrapper. r=mrbkap
...
--HG--
extra : rebase_source : 6013d2b7386f907af761098d006949ba07c163d7
2017-01-18 20:34:31 +08:00
Boris Zbarsky
bcc1d4ab44
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
72ca8d1730
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
a8939590de
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
b8b1677f0f
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
c8a25251c1
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
8d6d44ecb8
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
aa969022b0
Bug 1081985 - Remove prototype remapping and make COWs simple. r=gabor
...
\o/
2014-10-20 15:52:53 +02:00
Bobby Holley
ad9fdda6a1
Bug 1081990 - Turn off COWs for Functions. r=gabor
2014-10-18 11:02:10 +02:00
Bobby Holley
8d92103817
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
48adeafe98
Bug 1081990 - Give all non-COW filtering wrappers a null proto. r=gabor
2014-10-18 11:02:10 +02:00
Bobby Holley
7575a7e608
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
25211c35fe
Bug 1065185 - Expand XrayWrapper console messages for COWs. r=bz
2014-10-03 10:05:51 +02:00
Bobby Holley
a04e5f6e91
Bug 965898 - Handleify more stuff. r=me
2014-07-30 12:23:04 -07:00
Bobby Holley
99778c8324
Bug 965898 - Switch policies for get{,Own}PropertyDescriptor. r=gabor
2014-07-30 12:23:03 -07:00
Bobby Holley
49e86ce330
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
8f84226eb0
Bug 965898 - Switch policies for get{,Own}PropertyDescriptor. r=gabor
2014-07-29 21:35:32 -07:00
Bobby Holley
4a9f9e844b
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
a5a0be7595
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
38b0b1f449
Bug 1006692 - Replaced nsScriptSecurityManager::SubjectIsPrivileged and AccessCheck::IsCallerChrome by nsContentUtils::IsCallerChrome. r=bholley
2014-05-19 13:39:00 +02:00
Birunthan Mohanathas
c48b86b0c6
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
fbb9b62de8
Bug 825392 - Remove SOWs. r=bz
2014-03-19 13:35:45 -03:00
Bobby Holley
8dee0c93c9
Bug 976704 - Make opaque security wrappers non-callable. r=gabor,sr=mrbkap
2014-03-18 19:23:45 -03:00
Bobby Holley
1c600e7056
Bug 956382 - Remove usage of explicit *IgnoringDomain variants. r=mrbkap
2014-02-13 18:57:36 -08:00
Bobby Holley
e0f33e6e2e
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
26295823eb
Bug 965901 - Add an ENUMERATE policy action. r=gabor sr=mrbkap
2014-02-13 10:54:08 -08:00
Bobby Holley
78a5768df9
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
8129026433
Bug 912411 (part 2) - Move JSID_{VOID,EMPTY}HANDLE from jsapi.{h,cpp} to Id.{h,cpp}. r=luke.
...
--HG--
extra : rebase_source : 5fb68bf5079e3261fdca6cb99717d3a502c878f3
2013-09-05 16:08:57 -07:00
Nicholas Nethercote
7fbc04343e
Bug 910109 (part 2) - Make jswrapper.h not depend on jsapi.h. r=luke.
...
--HG--
extra : rebase_source : 138e93b074691e9da0feab9cd24e149f4d5edf6a
2013-08-28 17:24:34 -07:00
Nicholas Nethercote
2585de9a07
Bug 905017 (part 1) - Minimize inclusions of JS engine headers in .h and .idl files. r=billm.
...
--HG--
extra : rebase_source : 984c61ab12f46be0509b1ce0d458d9a6e5841c64
2013-08-17 15:50:18 -07:00
Jon Coppeard
37b7b92c4c
Bug 885310 - 2 Rename JSHandleFoo in js directory r=bholley
2013-06-21 14:12:46 +01:00
Bobby Holley
89be72dd4e
Bug 862380 - Silently fail for enumerate-like operations on XOWs. r=mrbkap
2013-05-22 22:27:15 -06:00
Bobby Holley
a76f725f9c
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
a2aebddd70
Bug 871595 - don't include WrapperFactory.h in AccessCheck.h; r=bholley
2013-05-13 12:04:23 -04:00
Bobby Holley
75723ecffd
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
61705225bc
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
eadd54865e
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
bc8fa5b7e3
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
7ca7a4cb72
Bug 854480 - Remove SCRIPT_ACCESS_ONLY. r=mrbkap
2013-04-01 15:17:51 -07:00
Bobby Holley
dace71a951
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
318dfacf98
Backed out 22 changesets (bug 658909) for Windows debug bustage.
2013-03-21 15:24:54 -04:00
Bobby Holley
13040f7556
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
57f408ca00
Backout bug 658909 for Marionette bustage.
2013-03-17 10:44:33 +01:00
Bobby Holley
91b7386681
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
d916a1015e
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
7529e0b16b
Back out 4d301b2bcad0:e0632e639097 (bug 836301) for Windows build bustage
...
CLOSED TREE
2013-02-22 08:41:37 -08:00
Bobby Holley
2c74bb15cf
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
26a118b43a
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