<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Simple Cross Site Scripting (XSS) Servlet Filter</title>
	<atom:link href="http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/feed/" rel="self" type="application/rss+xml" />
	<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/</link>
	<description>Self-proclaimed greatness is a hard thing to prove.</description>
	<lastBuildDate>Mon, 01 Mar 2010 19:05:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: 穿過雲層оО Rudy &#124; java过滤跨站脚本(XSS)攻击的simple代码</title>
		<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/comment-page-1/#comment-1247</link>
		<dc:creator>穿過雲層оО Rudy &#124; java过滤跨站脚本(XSS)攻击的simple代码</dc:creator>
		<pubDate>Wed, 24 Feb 2010 06:16:17 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/uncategorized/simple-cross-site-scripting-xss-servlet-filter/#comment-1247</guid>
		<description>[...] override the getParameter methods and clean any potential script injection. Here’s the Filter:  view plaincopy to [...]</description>
		<content:encoded><![CDATA[<p>[...] override the getParameter methods and clean any potential script injection. Here’s the Filter:  view plaincopy to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/comment-page-1/#comment-1219</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 08 Feb 2010 12:21:06 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/uncategorized/simple-cross-site-scripting-xss-servlet-filter/#comment-1219</guid>
		<description>Is there any updated code available for cleanXSS method, considering the comments provided above?</description>
		<content:encoded><![CDATA[<p>Is there any updated code available for cleanXSS method, considering the comments provided above?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tapas Adhikary</title>
		<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/comment-page-1/#comment-980</link>
		<dc:creator>Tapas Adhikary</dc:creator>
		<pubDate>Mon, 06 Apr 2009 09:48:43 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/uncategorized/simple-cross-site-scripting-xss-servlet-filter/#comment-980</guid>
		<description>Sorry , I meant ,
value = value.replaceAll(”(?i)script”, “”); instead of
value = value.replaceAll(”script”, “”); for a case insensitive replacement.

In my last comment...</description>
		<content:encoded><![CDATA[<p>Sorry , I meant ,<br />
value = value.replaceAll(”(?i)script”, “”); instead of<br />
value = value.replaceAll(”script”, “”); for a case insensitive replacement.</p>
<p>In my last comment&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tapas Adhikary</title>
		<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/comment-page-1/#comment-979</link>
		<dc:creator>Tapas Adhikary</dc:creator>
		<pubDate>Mon, 06 Apr 2009 09:47:25 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/uncategorized/simple-cross-site-scripting-xss-servlet-filter/#comment-979</guid>
		<description>Adding (?i) , in front of the replacing String would treat it as case insensitive way of replacement. So , in  cleanXSS() method , you can use 
value = value.replaceAll(&quot;(?i)script&quot;, &quot;&quot;);  instead of 
value = value.replaceAll(&quot;(?i)script&quot;, &quot;&quot;); for a case insensitive replacement.

Thanks,
-Tapas</description>
		<content:encoded><![CDATA[<p>Adding (?i) , in front of the replacing String would treat it as case insensitive way of replacement. So , in  cleanXSS() method , you can use<br />
value = value.replaceAll(&#8220;(?i)script&#8221;, &#8220;&#8221;);  instead of<br />
value = value.replaceAll(&#8220;(?i)script&#8221;, &#8220;&#8221;); for a case insensitive replacement.</p>
<p>Thanks,<br />
-Tapas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: webguy</title>
		<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/comment-page-1/#comment-971</link>
		<dc:creator>webguy</dc:creator>
		<pubDate>Sat, 28 Mar 2009 12:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/uncategorized/simple-cross-site-scripting-xss-servlet-filter/#comment-971</guid>
		<description>I think the main idea here is the use of a Servlet Filter to override the getParameter methods of the HttpServletRequest with an HttpServletRequestWrapper, the cleanXSS method I&#039;m sure is not perfect, but is welcome to improvement, you could use a more complex regex to make it case insensitive to fix the &quot;SCript&quot; condition</description>
		<content:encoded><![CDATA[<p>I think the main idea here is the use of a Servlet Filter to override the getParameter methods of the HttpServletRequest with an HttpServletRequestWrapper, the cleanXSS method I&#8217;m sure is not perfect, but is welcome to improvement, you could use a more complex regex to make it case insensitive to fix the &#8220;SCript&#8221; condition</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Masa</title>
		<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/comment-page-1/#comment-970</link>
		<dc:creator>Masa</dc:creator>
		<pubDate>Sat, 28 Mar 2009 08:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/uncategorized/simple-cross-site-scripting-xss-servlet-filter/#comment-970</guid>
		<description>Hi

I am interested in XSS and XSRF for protecting our servers.
I&#039;m glad to refer your XSS Filter.

If input characters is &quot;SCRIPT&quot; or &quot;ScRipT&quot;, what should we do about line 49?</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I am interested in XSS and XSRF for protecting our servers.<br />
I&#8217;m glad to refer your XSS Filter.</p>
<p>If input characters is &#8220;SCRIPT&#8221; or &#8220;ScRipT&#8221;, what should we do about line 49?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/comment-page-1/#comment-966</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 25 Mar 2009 16:18:20 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/uncategorized/simple-cross-site-scripting-xss-servlet-filter/#comment-966</guid>
		<description>Since line 45 replaces parathesis, line 47 will never be hit. Also, replacing all the JS events (onload, onclick, etc) is a good idea, as is making the match case insensitive.</description>
		<content:encoded><![CDATA[<p>Since line 45 replaces parathesis, line 47 will never be hit. Also, replacing all the JS events (onload, onclick, etc) is a good idea, as is making the match case insensitive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MArtin</title>
		<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/comment-page-1/#comment-942</link>
		<dc:creator>MArtin</dc:creator>
		<pubDate>Tue, 27 Jan 2009 08:16:18 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/uncategorized/simple-cross-site-scripting-xss-servlet-filter/#comment-942</guid>
		<description>Hi, to be shure there is no evil code in the Request the URLEncoder-Output has to be checked too: %3Cscript%3Ealert%281234%29%3C%2Fscript%3E</description>
		<content:encoded><![CDATA[<p>Hi, to be shure there is no evil code in the Request the URLEncoder-Output has to be checked too: %3Cscript%3Ealert%281234%29%3C%2Fscript%3E</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/comment-page-1/#comment-843</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 10 Dec 2008 17:40:05 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/uncategorized/simple-cross-site-scripting-xss-servlet-filter/#comment-843</guid>
		<description>I&#039;m getting this error on my jsps after I&#039;ve implemented this filter. Any idea what causes this?

              
[12/10/08 12:38:43:289 EST] 0000003e ServletWrappe E   SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /welcome.jsp. Exception thrown : javax.servlet.ServletException: non-HTTP request or response</description>
		<content:encoded><![CDATA[<p>I&#8217;m getting this error on my jsps after I&#8217;ve implemented this filter. Any idea what causes this?</p>
<p>[12/10/08 12:38:43:289 EST] 0000003e ServletWrappe E   SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /welcome.jsp. Exception thrown : javax.servlet.ServletException: non-HTTP request or response</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anom</title>
		<link>http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/comment-page-1/#comment-791</link>
		<dc:creator>anom</dc:creator>
		<pubDate>Wed, 26 Nov 2008 11:21:22 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/uncategorized/simple-cross-site-scripting-xss-servlet-filter/#comment-791</guid>
		<description>hi can you please4 explain the meaning of each line in method private String cleanXSS(String value).. i mean which line is used to prevent what.</description>
		<content:encoded><![CDATA[<p>hi can you please4 explain the meaning of each line in method private String cleanXSS(String value).. i mean which line is used to prevent what.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
