gecko-dev/content
norris%netscape.com 51842ef45e 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
..
base Fix 18553 [DOGFOOD] addEventListener allows sniffing keystrokes 1999-11-25 05:28:18 +00:00
events Fix 18553 [DOGFOOD] addEventListener allows sniffing keystrokes 1999-11-25 05:28:18 +00:00
html Fixes for 19650 and 15133. Added nsHTMLDocument::Resolve(). Script event handler compilation is deferred till when the event handler is first invoked. Atoms used for event name comparisions instead of strings. R=joki 1999-11-25 00:05:21 +00:00
shared Fixes for 19650 and 15133. Added nsHTMLDocument::Resolve(). Script event handler compilation is deferred till when the event handler is first invoked. Atoms used for event name comparisions instead of strings. R=joki 1999-11-25 00:05:21 +00:00
xml Changed nsIPresContext& to nsIPresContext*. Changed nsEventStatus& to nsEventStatus*. Now more compatible with XPIDL. a=vidur r=scc 1999-11-24 06:03:41 +00:00
xsl updated license boilerplate to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:40:37 +00:00
xslt/src Added preliminary DocumentHandler.h 1999-11-25 03:03:07 +00:00
xul Changed signature of AddScriptEventListener. Event handlers that are attributes of XUL elements are now compiled only when first invoked. R=joki 1999-11-25 00:06:10 +00:00