<?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: 5 signs your ASP.NET application may be vulnerable to HTML injection</title>
	<atom:link href="http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection/feed" rel="self" type="application/rss+xml" />
	<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection</link>
	<description>A .NET developer in Redmond</description>
	<lastBuildDate>Wed, 10 Mar 2010 22:08:10 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Daily Links for Friday, June 19th, 2009</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-19463</link>
		<dc:creator>Daily Links for Friday, June 19th, 2009</dc:creator>
		<pubDate>Fri, 19 Jun 2009 11:47:36 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-19463</guid>
		<description>[...] 5 signs your ASP.NET application may be vulnerable to HTML injection » DamienG [...]</description>
		<content:encoded><![CDATA[<p>[...] 5 signs your ASP.NET application may be vulnerable to HTML injection » DamienG [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Podcast #58 - Blog - Stack Overflow</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-19382</link>
		<dc:creator>Podcast #58 - Blog - Stack Overflow</dc:creator>
		<pubDate>Thu, 18 Jun 2009 02:20:31 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-19382</guid>
		<description>[...] right about something. Don&#8217;t HTML encode data that&#8217;s stored in your database! Take the good advice of Damien Guard and Joel Spolsky! You can choose to store both representations, but don&#8217;t store just the [...]</description>
		<content:encoded><![CDATA[<p>[...] right about something. Don&#8217;t HTML encode data that&#8217;s stored in your database! Take the good advice of Damien Guard and Joel Spolsky! You can choose to store both representations, but don&#8217;t store just the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-11169</link>
		<dc:creator>Amit</dc:creator>
		<pubDate>Thu, 12 Feb 2009 03:01:34 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-11169</guid>
		<description>Damien,
When you say &quot;You would imagine the high-level WebForms controls would take care of encoding and you&#039;d be wrong.&quot;. Is there a list of controls that are vulnerable and a list of controls that are not?</description>
		<content:encoded><![CDATA[<p>Damien,<br />
When you say &#8220;You would imagine the high-level WebForms controls would take care of encoding and you&#8217;d be wrong.&#8221;. Is there a list of controls that are vulnerable and a list of controls that are not?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fady Anwar</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5653</link>
		<dc:creator>Fady Anwar</dc:creator>
		<pubDate>Wed, 19 Dec 2007 12:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5653</guid>
		<description>great article, i like the ideas in it
a kick from me ;)</description>
		<content:encoded><![CDATA[<p>great article, i like the ideas in it<br />
a kick from me ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How dangerous is HTML injection? &#187; DamienG</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5648</link>
		<dc:creator>How dangerous is HTML injection? &#187; DamienG</dc:creator>
		<pubDate>Wed, 19 Dec 2007 07:46:15 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5648</guid>
		<description>[...] For more ASP.NET examples check out 5 signs your ASP.NET application may be vulnerable to HTML injection. [...]</description>
		<content:encoded><![CDATA[<p>[...] For more ASP.NET examples check out 5 signs your ASP.NET application may be vulnerable to HTML injection. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien Guard</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5647</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Wed, 19 Dec 2007 07:41:18 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5647</guid>
		<description>It should be encoded regardless of where it came from or whether it is believed to be safe. The only exception is data you expect to contain HTML and are going to sanitize to ensure only has the HTML you like.

One example I&#039;ve seen is blogging software that fails to encode blog post titles because they are &#039;safe&#039; in that they are only entered by the blogging author.

You create a blog post called &quot;Using List&lt;T&gt; for collections&quot; and it shows up with &quot;Using List for collections&quot;, causes the page to fail validation and breaks the RSS feed.

[)amien</description>
		<content:encoded><![CDATA[<p>It should be encoded regardless of where it came from or whether it is believed to be safe. The only exception is data you expect to contain HTML and are going to sanitize to ensure only has the HTML you like.</p>
<p>One example I&#8217;ve seen is blogging software that fails to encode blog post titles because they are &#8217;safe&#8217; in that they are only entered by the blogging author.</p>
<p>You create a blog post called &#8220;Using List&lt;T&gt; for collections&#8221; and it shows up with &#8220;Using List for collections&#8221;, causes the page to fail validation and breaks the RSS feed.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Curran</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5644</link>
		<dc:creator>James Curran</dc:creator>
		<pubDate>Wed, 19 Dec 2007 02:29:57 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5644</guid>
		<description>But that&#039;s not really 5 signs --- It&#039;s really just one sign --- because , Response.Write, HtmlAnchor et al aren&#039;t the problem.  The problem is post.Author.  If it comes from a trusted source (i.e., you typed it in yourself), it&#039;s save to output directly.  If it comes from anywhere else (notably user input), then it must be encoded.</description>
		<content:encoded><![CDATA[<p>But that&#8217;s not really 5 signs &#8212; It&#8217;s really just one sign &#8212; because , Response.Write, HtmlAnchor et al aren&#8217;t the problem.  The problem is post.Author.  If it comes from a trusted source (i.e., you typed it in yourself), it&#8217;s save to output directly.  If it comes from anywhere else (notably user input), then it must be encoded.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Our daily link (2007-12-18) - Trumpi&#39;s blog</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5640</link>
		<dc:creator>Our daily link (2007-12-18) - Trumpi&#39;s blog</dc:creator>
		<pubDate>Tue, 18 Dec 2007 21:24:18 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5640</guid>
		<description>[...] 5 signs your ASP.NET application may be vulnerable to HTML injection - which means that you may be vulnerable to XSS attacks too. [...]</description>
		<content:encoded><![CDATA[<p>[...] 5 signs your ASP.NET application may be vulnerable to HTML injection &#8211; which means that you may be vulnerable to XSS attacks too. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien Guard</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5638</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Tue, 18 Dec 2007 18:51:55 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5638</guid>
		<description>Lol, I think that WordPress is determining that might be dangerous. Dave was, I think, mentioning the &lt;page validateRequest=&quot;true&quot; /&gt; option in web.config that tries to prevent your application accepting script from the user.

This is all well and good but if there are other ways to get data into your database (links with other company systems, web services, message pumps or even internal WinForms apps) then those too can be avenues for attack.

Many attacks happen from the inside and anyone with access to the SQL box or a WinForms app could be the one putting the payload there ready for your application to deliver up to unsuspecting users.

[)amien</description>
		<content:encoded><![CDATA[<p>Lol, I think that WordPress is determining that might be dangerous. Dave was, I think, mentioning the &lt;page validateRequest=&#8221;true&#8221; /&gt; option in web.config that tries to prevent your application accepting script from the user.</p>
<p>This is all well and good but if there are other ways to get data into your database (links with other company systems, web services, message pumps or even internal WinForms apps) then those too can be avenues for attack.</p>
<p>Many attacks happen from the inside and anyone with access to the SQL box or a WinForms app could be the one putting the payload there ready for your application to deliver up to unsuspecting users.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5637</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Tue, 18 Dec 2007 16:51:41 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5637</guid>
		<description>So...

By saying ASP.NET does nothing for you, are you implying that putting a &quot;&quot; section  into your web.config isn&#039;t working anymore for some reason?
It certainly isn&#039;t fool-proof, but it gives a huge head-start getting around the issues you are describing.</description>
		<content:encoded><![CDATA[<p>So&#8230;</p>
<p>By saying ASP.NET does nothing for you, are you implying that putting a &#8220;&#8221; section  into your web.config isn&#8217;t working anymore for some reason?<br />
It certainly isn&#8217;t fool-proof, but it gives a huge head-start getting around the issues you are describing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ScottB</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5634</link>
		<dc:creator>ScottB</dc:creator>
		<pubDate>Tue, 18 Dec 2007 15:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5634</guid>
		<description>Great article, I have always encoded entries into the db but never encoded the output from the DB. After reading this I was like &quot;duh!! why didn&#039;t I think if that&quot;. I wonder if someone could make an Ajax extender for a textbox that automatically encodes the output. Thanks again, Scott</description>
		<content:encoded><![CDATA[<p>Great article, I have always encoded entries into the db but never encoded the output from the DB. After reading this I was like &#8220;duh!! why didn&#8217;t I think if that&#8221;. I wonder if someone could make an Ajax extender for a textbox that automatically encodes the output. Thanks again, Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien Guard</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5630</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Tue, 18 Dec 2007 13:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5630</guid>
		<description>Yeah I agree with you here and have to conceed that JSF/JSP did the right thing.

Microsoft almost got it right with the HtmlControls but for that bug I found.

[)amien</description>
		<content:encoded><![CDATA[<p>Yeah I agree with you here and have to conceed that JSF/JSP did the right thing.</p>
<p>Microsoft almost got it right with the HtmlControls but for that bug I found.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5629</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Tue, 18 Dec 2007 12:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5629</guid>
		<description>And interestingly, I think shortcuts like {! have a downside. Sure it&#039;s quicker to type, but it does nothing to remind you that you should be using it. And, it&#039;s arguably harder to spot a missing ! when you&#039;re reviewing code than it is to miss a missing explicit encoding/escaping method call. I don&#039;t think shortcuts are the answer at all, making safety the default is much more robust.</description>
		<content:encoded><![CDATA[<p>And interestingly, I think shortcuts like {! have a downside. Sure it&#8217;s quicker to type, but it does nothing to remind you that you should be using it. And, it&#8217;s arguably harder to spot a missing ! when you&#8217;re reviewing code than it is to miss a missing explicit encoding/escaping method call. I don&#8217;t think shortcuts are the answer at all, making safety the default is much more robust.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5628</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Tue, 18 Dec 2007 12:25:30 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5628</guid>
		<description>I wonder why escaping (or encoding if you prefer) the HTML isn&#039;t the default on the higher-level constructs. I can understand why the low-level ASP output methods don&#039;t do it, but IMO higher level frameworks should always default to safe behaviour. Having to remember to explicitly escape is a huge pain the ass. 

I know everyone except me reading your blog hates Java, but again JSF demonstrates good practice here, by defaulting to escaping HTML. Since JSF is a common building block for most serious Java web software, the result is that most people building using it will have at least that minimum requirement covered without having to keep reminding themselves. I think the MVC framework, or some intermediate view component for ASP (as JSF is to JSP) should do the same.</description>
		<content:encoded><![CDATA[<p>I wonder why escaping (or encoding if you prefer) the HTML isn&#8217;t the default on the higher-level constructs. I can understand why the low-level ASP output methods don&#8217;t do it, but IMO higher level frameworks should always default to safe behaviour. Having to remember to explicitly escape is a huge pain the ass. </p>
<p>I know everyone except me reading your blog hates Java, but again JSF demonstrates good practice here, by defaulting to escaping HTML. Since JSF is a common building block for most serious Java web software, the result is that most people building using it will have at least that minimum requirement covered without having to keep reminding themselves. I think the MVC framework, or some intermediate view component for ASP (as JSF is to JSP) should do the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien Guard</title>
		<link>http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5622</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Tue, 18 Dec 2007 07:37:34 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2007/12/18/5-signs-your-aspnet-application-may-be-vulnerable-to-html-injection#comment-5622</guid>
		<description>{! } is good in MonoRail, I think Ayende added it in response to my ticket on encoding being off by default and causing a problem through to components such as the SmartGrid.

Having something similar in MVC would be great although personally I&#039;d love it to be mapped to a method on a new HtmlViewPage class which inherits from ViewPage so that you can switch out the encoding method for different output types.

There is some discussion about the whole issue so we&#039;ll see what happens.

[)amien</description>
		<content:encoded><![CDATA[<p>{! } is good in MonoRail, I think Ayende added it in response to my ticket on encoding being off by default and causing a problem through to components such as the SmartGrid.</p>
<p>Having something similar in MVC would be great although personally I&#8217;d love it to be mapped to a method on a new HtmlViewPage class which inherits from ViewPage so that you can switch out the encoding method for different output types.</p>
<p>There is some discussion about the whole issue so we&#8217;ll see what happens.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
</channel>
</rss>
