Don&#39;t allow on(anything)? ModSecurity has an &quot;xss&quot; monster regex... blacklisting is always error prone.<br><br><div class="gmail_quote">On Thu, Dec 4, 2008 at 5:14 PM, Jon Daley <span dir="ltr">&lt;<a href="mailto:plogworld@jon.limedaley.com">plogworld@jon.limedaley.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> &nbsp; &nbsp; &nbsp; &nbsp;Thanks. &nbsp;is there a better way to fix it than simply adding every tag we can think of, which I assume is always out-of-date, not exhaustive?<div>
<div></div><div class="Wj3C7c"><br>
<br>
On Thu, 4 Dec 2008, Matt Wood wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
filterjavascript doesn&#39;t filter all javascript... here is one example i noticed looking @ svn.<br>
&lt;img src=dne onerror=alert(0) /&gt;<br>
<br>
On Thu, Dec 4, 2008 at 4:21 PM, &lt;<a href="mailto:jondaley@devel.lifetype.net" target="_blank">jondaley@devel.lifetype.net</a>&gt; wrote:<br>
 &nbsp; &nbsp; &nbsp;Author: jondaley<br>
 &nbsp; &nbsp; &nbsp;Date: 2008-12-04 16:21:57 -0500 (Thu, 04 Dec 2008)<br>
 &nbsp; &nbsp; &nbsp;New Revision: 6754<br>
<br>
 &nbsp; &nbsp; &nbsp;Modified:<br>
 &nbsp; &nbsp; &nbsp;&nbsp; plugins/branches/lifetype-1.2/submissions/class/action/addsubmissionaction.class.php<br>
 &nbsp; &nbsp; &nbsp;Log:<br>
 &nbsp; &nbsp; &nbsp;have to allow HTML whether the tinymce editor is enabled or not. &nbsp;At least filter javascript<br>
<br>
 &nbsp; &nbsp; &nbsp;Modified: plugins/branches/lifetype-1.2/submissions/class/action/addsubmissionaction.class.php<br>
 &nbsp; &nbsp; &nbsp;===================================================================<br>
 &nbsp; &nbsp; &nbsp;--- plugins/branches/lifetype-1.2/submissions/class/action/addsubmissionaction.class.php &nbsp; &nbsp; &nbsp; &nbsp;2008-12-04<br>
 &nbsp; &nbsp; &nbsp;21:16:19 UTC (rev 6753)<br>
 &nbsp; &nbsp; &nbsp;+++ plugins/branches/lifetype-1.2/submissions/class/action/addsubmissionaction.class.php &nbsp; &nbsp; &nbsp; &nbsp;2008-12-04<br>
 &nbsp; &nbsp; &nbsp;21:21:57 UTC (rev 6754)<br>
 &nbsp; &nbsp; &nbsp;@@ -70,15 +70,15 @@<br>
<br>
 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;_text = &quot;&quot;;<br>
 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $text = $this-&gt;_request-&gt;getValue( &quot;submissionText&quot; );<br>
 &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $config =&amp; Config::getConfig();<br>
 &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$htmlEnabled = $config-&gt;getValue(&quot;plugin_submissions_htmlarea_enabled&quot;);<br>
 &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$val2 = new StringValidator($htmlEnabled);<br>
 &nbsp; &nbsp; &nbsp;+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$val2 = new StringValidator(true);<br>
 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if( !$val2-&gt;validate( $text )) {<br>
 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $errors[&quot;submissionText&quot;] = true;<br>
 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $message[&quot;submissionText&quot;] = $this-&gt;_locale-&gt;tr(&quot;error_submission_no_text&quot;);<br>
 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else{<br>
 &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;_text = $text;<br>
 &nbsp; &nbsp; &nbsp;+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// is this too much? &nbsp;Maybe just remove javascript?<br>
 &nbsp; &nbsp; &nbsp;+// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;_text = Textfilter::filterHtml($text);<br>
 &nbsp; &nbsp; &nbsp;+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;_text = Textfilter::filterJavaScript($text);<br>
 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
<br>
 &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;_categoryIds = &quot;&quot;;<br>
<br>
 &nbsp; &nbsp; &nbsp;_______________________________________________<br>
 &nbsp; &nbsp; &nbsp;pLog-svn mailing list<br>
 &nbsp; &nbsp; &nbsp;<a href="mailto:pLog-svn@devel.lifetype.net" target="_blank">pLog-svn@devel.lifetype.net</a><br>
 &nbsp; &nbsp; &nbsp;<a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br>
<br>
<br>
<br>
<br>
</blockquote>
<br></div></div><font color="#888888">
-- <br>
Jon Daley<br>
<a href="http://jon.limedaley.com" target="_blank">http://jon.limedaley.com</a><br>
~~<br>
Lady: One who makes a man behave like a gentleman.<br>
-- Jimmy Lyons</font><br>_______________________________________________<br>
pLog-svn mailing list<br>
<a href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</a><br>
<a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br></blockquote></div><br>