Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #26542
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Removing scripts |
| Date | 2015-01-11 14:47 +0100 |
| Organization | solani.org |
| Message-ID | <m8tusc$amb$1@solani.org> (permalink) |
| References | <100120151843135093%timstreater@greenbee.net> <m8todg$hvs$1@solani.org> <15618724.3DthdCSHB2@PointedEars.de> |
Thomas 'PointedEars' Lahn wrote: > Christoph M. Becker wrote: > >> Tim Streater wrote: >>> I have some untrusted HTML, so I want to de-activate any <scripts> it >>> contains before shoving it into an iframe. Is there any reason not to >>> do the following? >>> […] >>> iframePtr.open (); >>> iframePtr.write (new XMLSerializer().serializeToString (newdoc)); >>> iframePtr.close (); >> >> Have you considered event handler attributes? > > Pardon? The given script[1] only caters for script elements. One reason not to use it would be that event handlers on elements could contain malicious script code, which would pass this "clean up". > In general, filtering needs to be done server-side, ACK. However, a black listing approach is likely to be insufficient anyway. [1] <news:100120151843135093%timstreater@greenbee.net> -- Christoph M. Becker
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Removing scripts Tim Streater <timstreater@greenbee.net> - 2015-01-10 18:43 +0000
Re: Removing scripts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-10 22:32 +0100
Re: Removing scripts Richard Damon <Richard@Damon-Family.org> - 2015-01-10 22:07 -0500
Re: Removing scripts Tim Streater <timstreater@greenbee.net> - 2015-01-11 09:16 +0000
Re: Removing scripts "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-01-11 12:56 +0100
Re: Removing scripts Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-11 14:23 +0100
Re: Removing scripts "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-01-11 14:47 +0100
Re: Removing scripts Tim Streater <timstreater@greenbee.net> - 2015-01-11 15:08 +0000
csiph-web