Commit Graph

167 Commits

Author SHA1 Message Date
Ryan VanderMeulen
e6131fc8b8 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez
2128198065 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-06-24 14:11:00 -04:00
Bobby Holley
5fe70c6e20 Bug 1152784 - Be more robust about possible intermediate wrappers in IsFrameId. r=bz
Boris and I debugged this. It looks like we're somehow ending up with an
XrayWaiver on the other end of a CrossOriginXrayWrapper. The specifics of how
this happens are a bit fuzzy to me, but it's presumably happening in all the
brain transplant weirdness we do when recomputing wrappers during document.domain.

Having an XrayWaiver there isn't unsafe - the wrapper computation algorithm
will ignore the waiver if the principals don't allow the caller to waive. But
it does throw a wrench in some brittle code that only expects certain kinds
of wrappers. Let's just do what XrayTraits::getTargetObject does. I don't think
this is really unsafe at all, because the only wrapper with a security boundary
is the CCW, and we're already stripping that off unconditionally with
Wrapper::wrappedObject.
2015-04-10 00:28:05 -07:00
Jan de Mooij
24e926ddb3 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
9d871304c0 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
47c1798049 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 12:08:37 +01:00
Jason Orendorff
3e684c2df6 Bug 1133081, part 5 - Remove non-asserting PropertyDescriptor accessors in favor of the new PropDesc-inspired asserting accessors. r=efaust.
value() can't assert hasValue() because too many places have plausible reasons for calling it on a PropertyDescriptor they basically know nothing about. One such place is CompartmentChecker::check(Handle<JSPropertyDescriptor>). Another is DefinePropertyByDescriptor. Maybe this will change with time.

In some cases we do things like `desc.hasWritable() && desc.writable() != existing_desc.writable()`. It is OK to write it this way, even though we have not checked existing_desc.hasWritable(), because in these cases we already know existingDesc is a complete property descriptor.
2015-02-15 06:18:30 -06:00
Bill McCloskey
69189e8a1d Bug 1123461 - Make a real interface for js/ipc (r=dvander) 2015-01-26 13:32:18 -08:00
Tom Schuster
2c5156e1a9 Bug 1094176 - Remove lookup API from browser. r=bholley 2014-12-17 00:28:39 +01:00
Bobby Holley
27c33fa905 Bug 1081985 - Move checkPassToPrivilegedCode to AccessCheck.cpp where it belongs. r=gabor 2014-10-20 15:52:52 +02:00
Bobby Holley
2b9f5ad11e Bug 1081990 - Turn off COWs for Functions. r=gabor 2014-10-18 11:02:10 +02:00
Bobby Holley
bb96350313 Bug 1084245 - Introduce a hacky opt-out of the new security checks for MozTCPSocket. r=bz 2014-10-17 18:02:19 +02:00
Bobby Holley
2e3001ea54 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
bb91a5e2ec Bug 1082450 - Deny access to cross-origin callables on COWs. r=gabor 2014-10-15 15:05:10 +02:00
Bobby Holley
1849223c81 Bug 1082450 - Deny access to accessor properties on COWs. r=gabor 2014-10-15 15:05:10 +02:00
Bobby Holley
1ce7f267dc Bug 1065185 - Turn off indexed/.length access on COW arrays. r=bz 2014-10-03 10:05:52 +02:00
Bobby Holley
e576260c18 Bug 1065185 - Expand XrayWrapper console messages for COWs. r=bz 2014-10-03 10:05:51 +02:00
Bobby Holley
d1fbd2c226 Bug 1060521 - Remove infrastructure for Xrayed NewResolve, GetProperty, and SetProperty on XPCWrappedNatives. r=peterv 2014-09-15 14:13:02 +02:00
Chris Peterson
412ea5db86 Bug 1063962 - Replace jschar typedef with C++11 char16_t type. r=jandem 2014-07-21 21:43:21 -07:00
Bobby Holley
2588a209b9 Bug 965898 - Handleify more stuff. r=me 2014-07-30 12:23:04 -07:00
Bobby Holley
9352980643 Bug 965898 - Squelch exceptions during the shadowing detection in isCrossOriginAccessPermitted. r=gabor 2014-07-30 12:23:03 -07:00
Bobby Holley
03c3ed722d Bug 965898 - Switch policies for get{,Own}PropertyDescriptor. r=gabor 2014-07-30 12:23:03 -07:00
Bobby Holley
85dbc0bbdf Bug 965898 - Implement proper behavior for [[Enumerate]] And [[OwnPropertyKeys]]. r=gabor 2014-07-30 12:23:02 -07:00
Bobby Holley
f09600aa41 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
11fa02bd53 Bug 965898 - Squelch exceptions during the shadowing detection in isCrossOriginAccessPermitted. r=gabor 2014-07-29 21:35:32 -07:00
Bobby Holley
849c04fb55 Bug 965898 - Switch policies for get{,Own}PropertyDescriptor. r=gabor 2014-07-29 21:35:32 -07:00
Bobby Holley
2c94a4ea50 Bug 965898 - Implement proper behavior for [[Enumerate]] And [[OwnPropertyKeys]]. r=gabor 2014-07-29 21:35:31 -07:00
Bobby Holley
2052f2965f Bug 1036185 - Clean up logic in IsPermitted (bonus fix). r=gabor 2014-07-15 09:04:19 -07:00
Boris Zbarsky
8ea5b82c24 Bug 832014 part 9. Switch AccessCheck to using the generated LocationBinding::IsPermitted method. r=bholley 2014-07-11 19:34:44 -04:00
Jan de Mooij
8b6b81e090 Bug 1034627 part 3 - Fix SandboxDump, AccessCheck.cpp to work with Latin1 strings and nursery strings. r=bholley 2014-07-10 17:36:35 +02:00
Jan de Mooij
f3876da607 Bug 1034191 - Make nsDependentJSString users work with Latin1 strings and nursery-allocated strings. r=bz 2014-07-05 17:30:54 +02:00
Bobby Holley
26f0951b3e 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
Bobby Holley
499052748f Bug 1022016 - Redesign nsDependentJSString API to be less of a footgun. r=gabor 2014-06-10 20:15:56 -07:00
Julien Levesy
bb264024ec Bug 1006692 - Replaced nsScriptSecurityManager::SubjectIsPrivileged and AccessCheck::IsCallerChrome by nsContentUtils::IsCallerChrome. r=bholley 2014-05-19 13:39:00 +02:00
Bobby Holley
9142b5fa4e Bug 1001198 - Explicitly fire up the SSM from nsXPConnect. r=gabor 2014-05-06 23:17:43 -07:00
Bobby Holley
e76375b0e6 Bug 997987 - Cache the system principal on nsContentUtils and remove nsIScriptSecurityManager::SubjectPrincipalIsSystem. r=Ms2ger,sr=bz 2014-05-06 15:43:03 -07:00
Birunthan Mohanathas
00f577316a Bug 866289 - Make mode lines consistent in js/xpconnect/ for 4 space indented files. r=Ms2ger 2014-04-03 07:58:00 -04:00
Jason Orendorff
009c8c80e0 Bug 547140, part 2 - Remove flags argument from JS_GetPropertyDescriptor and friends. r=Waldo. 2014-04-25 16:11:01 -05:00
Bobby Holley
e9c4522522 Bug 975042 - Remove the special COW support for Date. r=peterv
As soon as Date is on Xrays, this stuff won't work anyway. Henceforth, content
access to chrome Date objects is forbidden, and APIs should use something like
|new contentWindow.Date()| for any Date object they wish to expose to content.
2014-03-23 11:02:12 -03:00
Carsten "Tomcat" Book
f3d2e516ee Backed out changeset f787c0fa465e (bug 975042) for B2G ICS Emulator M7 Orange on a CLOSED TREE 2014-03-21 08:48:40 +01:00
Bobby Holley
0746f87f9f Bug 975042 - Remove the special COW support for Date. r=peterv
As soon as Date is on Xrays, this stuff won't work anyway. Henceforth, content
access to chrome Date objects is forbidden, and APIs should use something like
|new contentWindow.Date()| for any Date object they wish to expose to content.
2014-03-20 23:47:23 -03:00
Bobby Holley
4fb8ea865c Bug 825392 - Remove SOWs. r=bz 2014-03-19 13:35:45 -03:00
Peter Van der Beken
79452ebb1f Bug 982112 - Make accesscheck code deal with WebIDL bindings. r=bz. 2013-11-05 09:47:59 +01:00
Bobby Holley
58c0c8876c Bug 975277 - Clean up the XPCWN XrayHolder a bit. r=gabor 2014-02-21 15:55:31 -08:00
Bobby Holley
4211893075 Bug 956382 - Remove usage of explicit *IgnoringDomain variants. r=mrbkap 2014-02-13 18:57:36 -08:00
Bobby Holley
13a4ff6a45 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
73ce31f07f Bug 965901 - Add an ENUMERATE policy action. r=gabor sr=mrbkap 2014-02-13 10:54:08 -08:00
Bobby Holley
50f9d2007f Bug 958324 - Remove same-compartment security wrappers for WNs. r=peterv,r=mrbkap
We've fixed Components, and SOWs are new-binding only. Youpie!
2014-01-21 08:26:40 -08:00
Bobby Holley
57517a7c7d 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
Wes Kocher
34a2e0d974 Backed out changeset ef0eeaec74a8 (bug 949183) on the theory that it somehow broke every single b2g test on a CLOSED TREE 2013-12-16 18:27:43 -08:00