﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Um commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>Ayende,
  
  
I don't know, probably nothing. However, there are other risks with XSS. The worst involve exploiting browser vulnerabilities to install trojans or hijackers (
[http://www.owasp.org/index.php/XSS](http://www.owasp.org/index.php/XSS)).
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment16</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment16</guid><pubDate>Wed, 02 Sep 2009 10:55:47 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>Um,
  
As I said, I contacted the SubText team and they are working on that.
  
What information do you think XSS can steal from visitors to this blog?
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment15</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment15</guid><pubDate>Wed, 02 Sep 2009 10:35:38 GMT</pubDate></item><item><title>Um commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>But a simple XSS attack _is_ possible, which puts your visitors at risk. I can't imagine that the default configuration of Subtext doesn't encode comments?!
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment14</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment14</guid><pubDate>Wed, 02 Sep 2009 10:31:09 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>Um,  Rob, test
  
Removed your comments
  
  
I am aware of the issue, and it will be fixed shortly.
  
There is no data disclosure possible here, so I don't rate it critical
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment13</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment13</guid><pubDate>Wed, 02 Sep 2009 10:24:12 GMT</pubDate></item><item><title>Bertrand Le Roy commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>@dave-ilsw: how is stripping safer than Html-encoding the whole comment?? It certainly is a lot more inconvenient.
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment12</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment12</guid><pubDate>Tue, 01 Sep 2009 20:04:17 GMT</pubDate></item><item><title>Daniel commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>Threading issue came to mind first, and looks like the case here.  I could also see this happening if you had some custom Collection
&lt;t implementation that didn't return the correct Count.  Looking at S.L.Buffer, it looks like it reuses ICollection.Count if you're passing a collection, otherwise, it loops over the IEnumerable and counts manually.  
&gt;</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment11</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment11</guid><pubDate>Tue, 01 Sep 2009 17:03:24 GMT</pubDate></item><item><title>dave-ilsw commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>@Um,
  
  
I'm not at all surprised that the blog engine takes the approach of stripping everything that is enclosed by &lt; and &gt; rather than trying to figure out what is safe and encoding the rest. In the long run, stripping is safer.
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment10</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment10</guid><pubDate>Tue, 01 Sep 2009 16:42:21 GMT</pubDate></item><item><title>Um commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>@Paul,
  
  
I'm quite surprised &lt;int&gt; is not being HTML encoded by the blog engine. What about tags such as 
 and 
&lt;script&gt;?
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment9</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment9</guid><pubDate>Tue, 01 Sep 2009 16:02:45 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>Rob,
  
Well, _that_ was fast.
  
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment8</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment8</guid><pubDate>Tue, 01 Sep 2009 15:27:26 GMT</pubDate></item><item><title>Paul Batum commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>Argh, I always forget to html encode my generics when posting blog comments.... :(
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment7</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment7</guid><pubDate>Tue, 01 Sep 2009 14:44:03 GMT</pubDate></item><item><title>Paul Batum commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>Indeed, as the others above have suggested, I would guess its a threading issue. This one was pretty easy to reproduce:
  
  
var ints = new List
&lt;int();
  
var thread = new Thread(delegate() { while (true) ints.Add(0); });
  
thread.Start();
  
while(true) Console.WriteLine(ints.ToArray().Length);
&gt;</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment6</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment6</guid><pubDate>Tue, 01 Sep 2009 14:41:46 GMT</pubDate></item><item><title>Kelly Stuard commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>+1 on Rob Jan's reason
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment5</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment5</guid><pubDate>Tue, 01 Sep 2009 14:39:46 GMT</pubDate></item><item><title>James Curran commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>It's taking the code path where the IEnumerable is really a ICollection, and using it's Count property to size the buffer.  This property was possibly lying.
  
  
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment4</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment4</guid><pubDate>Tue, 01 Sep 2009 14:32:48 GMT</pubDate></item><item><title>Rob commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>Threading issue as the IEnumerable was having elements added to it whilst the ToArray was called?
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment3</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment3</guid><pubDate>Tue, 01 Sep 2009 14:13:18 GMT</pubDate></item><item><title>Jan Willem B commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>The source is changing during evaluation.
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment2</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment2</guid><pubDate>Tue, 01 Sep 2009 14:13:15 GMT</pubDate></item><item><title>Akash Chopra commented on Challenge: Why isn&amp;rsquo;t select broken?</title><description>Infinite IEnumerable?
</description><link>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment1</link><guid>http://ayende.com/4164/challenge-why-isn-t-select-broken#comment1</guid><pubDate>Tue, 01 Sep 2009 14:10:04 GMT</pubDate></item></channel></rss>