Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
norris%netscape.com afb1f1e1e3 Fix
20257 unable to edit existing images in editor due to JS error
	19933 JavaScript "window.location" core dumps in CAPS
Back out previous changes for enforcing security on listeners and go with a
simple restriction of access to the method for adding listeners.
r=mstoltz
1999-12-01 22:23:22 +00:00
norris%netscape.com b62c04253e Fix 18553 [DOGFOOD] addEventListener allows sniffing keystrokes
Add checks to nsScriptSecurityManager::CheckCanListenTo that take
a principal and ensure that the currently executing script code
either is from the same origin as that principal or has the
UniversalBrowserRead privilege enabled. (chrome code has all
privileges enabled by default.) It's okay for the principal passed in
to be null. That just signifies a privileged window/document that only
can be listened to with privileges.

I added GetPrincipal/SetPrincipal methods to nsIEventListenerManager.
nsDocument::GetNewListenerManager sets a principal on the listener
manager when it creates one. Obviously there are other places that
create listener managers, but scripts seem to go through this one.

Another change is to save some memory usage. Currently I allocate an
array of PolicyType that is NS_DOM_PROP_MAX elements long.
Unfortunately, compilers appear to allocate four bytes for each
PolicyType, so the array takes around 2400 bytes. I've added changes
to use two bit vectors that should consume about 1/16 that space.

r=joki

There are also changes that push nsnull onto the JSContext stack when
entering a nested event loop.

r=jband
1999-11-25 05:28:18 +00:00
norris%netscape.com 1c4dac85f3 Modify generated dom code to use a enum rather than a string for codesize
and efficiency.
Tighten checks on document properties and node properties. Should resolve
several bugs:
18965 document.firstChild vulnerability
19043 document.childNodes vulnerability
19044 document.lastChild vulnerability
r=mstoltz
1999-11-20 07:28:34 +00:00
norris%netscape.com 411aade911 * Fix 12124 [DOGFOOD] Reading user's preferences
* Implement site-specific security policies (bug 858)
r=mstoltz
* Use Recycle rather than delete[] to clean up Purify logs
r=law
1999-11-16 05:07:31 +00:00
norris%netscape.com 6ba76593b3 * Fix the following bugs by tightening the default security policy.
17977 [DOGFOOD] Reading documents using document.body
17538 document.lastModified is exposed
17537 document.images vulnerabilities
16036 [DOGFOOD] document.Element exposes the DOM of documents from
15757 [DOGFOOD] Injecting JS code using setAttribute and getElemen
15550 Injecting text in documents from any domain using createText
15067 [DOGFOOD] getElementsByTagName() allows reading of arbitrary
* Create an array of dom property policy types and initialize it when the script security manager is created.
* Move some implementation code to a new shared implementation base class.
* Implement privilege enabling, disabling and reverting
* Implement stack walking for checking privileges.
r=mstoltz@netscape.com

* Modify nsIPref to support security policy work.
r=neeti@netscape.com
1999-11-11 22:10:36 +00:00
dmose%mozilla.org 8535dda53e updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
norris%netscape.com f665b3c482 work on bug 7270.
r=mstoltz.
Implement netscape.security.PrivilegeManager callbacks.
1999-10-28 22:09:03 +00:00
warren%netscape.com 00dfd9d907 Added nsIChannel::GetOriginalURI so that we can get back to the original chrome file (bug#17144). r=rpotts,mscott 1999-10-26 09:16:24 +00:00
norris%netscape.com d1e37156bd Add ability to disable JS. Fix 13978 shopping at webvan.com crashes 1999-09-17 20:13:52 +00:00
norris%netscape.com ae296a06da Add security support for javascript: uris. 1999-09-15 20:58:41 +00:00
norris%netscape.com 1dec7e80f7 Create preferences for security checks.
Add new methods on nsIScriptSecurityManager for capabilities.
Fix 13739 MLK: nsScriptSecurityManager::CreateCodebasePrincipal
Fix 11666 Eliminate plvector (was: [infinite loop] bugs - plvector.c)
1999-09-15 04:05:43 +00:00
norris%netscape.com 003099e93a Remove unused files. 1999-09-13 20:10:24 +00:00
norris%netscape.com 328b2bad86 Fix build breakage: full #include needed. 1999-09-07 21:26:56 +00:00
norris%netscape.com d5c6824781 Fix bug 13253.
Enable restrictions on use of Components array from web JavaScript.
1999-09-07 20:40:20 +00:00
briano%netscape.com 85a18579d5 Cleaned it up and eliminated the pointless #!gmake. 1999-09-01 23:27:16 +00:00
norris%netscape.com fa389e8dfb nsIPrincipalManager.idl removed. 1999-09-01 01:34:11 +00:00
norris%netscape.com bff57397e0 Add all-powerful system principals. Remove some dead code from the build. 1999-09-01 00:54:35 +00:00
joki%netscape.com 6397eaf9f8 Adding new flag to the security check calls out of the DOM generated JS files. 1999-08-31 14:23:54 +00:00
norris%netscape.com 59b4dc8374 * clean up nsScriptSecurityManager
* remove nsJSSecurityManager
* save principals in nsIChannels and nsIDocuments
1999-08-29 21:58:42 +00:00
arielb%netscape.com bb8560101c includes updates to codbase matching security checks currently turned off
but in place.  redefined the script security manager in caps and it is
now generating codebase principals.
1999-08-20 09:51:02 +00:00
arielb%netscape.com 96773aef1f removing public directory for good. fixed up nsPrivilegeManager.cpp 1999-08-08 21:04:16 +00:00
arielb%netscape.com 9b8f77f338 added a new and improved factory to caps module. fixed some bugs and
cleared some warnings.  also move some methods of privilege manager to
principal manager.
1999-08-06 22:44:35 +00:00
arielb%netscape.com 89e7fef930 add a principal manager to caps api. everything is now xpidled so
i removed the public directory from the module.
1999-08-01 21:26:02 +00:00
arielb%netscape.com 944fa42b7b xpidling and updating nsTarget object. should resolve build errors on
SeaMonkey Ports
1999-07-28 05:43:26 +00:00
briano%netscape.com d99daeea9b Cleaned it up and changed the name of libreg.{a,so} to libmozreg.{a,so} to fix the conflict reported in bug 8568. 1999-07-27 23:27:44 +00:00
arielb%netscape.com 561d1d2996 removed some enums and migrated them into nsPrivilege, nsIPrivilege and
nsPrivilegemanager. cleaning up some old code from the security module
and refining their api's and such like.
1999-07-27 00:50:59 +00:00
arielb%netscape.com 76ffc06aa5 Fix to the caps security module. I removed the nsPrincipal struct, from now
on you can access principals by their xpcomed interface nsIPrincipal.
1999-07-24 03:58:23 +00:00
sspitzer%netscape.com e8fcb92124 ignore the generated Makefile 1999-07-18 00:26:01 +00:00
arielb%netscape.com 640c0ce3e6 idled principals interfaces and some fixes to caps manager... 1999-07-16 20:31:18 +00:00
norris%netscape.com 7562aefe4a Move several security files into idl. (Create idl directory in caps module.)
Implement methods of nsIXPCSecurityManager.
Fix random errors in DOM JS security.
1999-07-15 23:23:16 +00:00