﻿<?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>Jimmy Bogard commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>@Jeff
  
  
There's some pointless configuration there - the Time member configuration isn't needed, AutoMapper can handle object-&gt;string w/o configuration. The second one I'd argue isn't needed either, you could just name the destination member OwnerName and be done with it.
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment13</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment13</guid><pubDate>Mon, 14 Mar 2011 12:41:19 GMT</pubDate></item><item><title>Jeff commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>What benefit do you get from using AutoMapper at all in the scenario? Looks like somebody is using it just for the sake of using it...
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment12</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment12</guid><pubDate>Sun, 13 Mar 2011 05:00:48 GMT</pubDate></item><item><title>Christopher Wright commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>I really want a preview function for these comments. The essence is providing a lastPost value of DateTime.MinValue (or something else very far in the past).
  
  
If you're guaranteeing that boards have a limited lifecycle in terms of number of updates, though, that wouldn't be so bad.
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment11</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment11</guid><pubDate>Sat, 12 Mar 2011 21:31:10 GMT</pubDate></item><item><title>Christopher Wright commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>GET 
[whiteboard/getlatestpost](http://whiteboard/getlatestpost?boardId=something&amp;lastPost=0001-01-01)  
  
This is a problem since a single call can create arbitrary amounts of work. If you require multiple calls, then you can have a firewall rule limiting the number of simultaneous connections from a given source or the number of connections from a source per minute. That guarantees that you can use the majority of server resources to process legitimate requests. If it's a single call, though, you're going to tie up an unbounded amount of memory and DB resources with no way to throttle individual users.
  
  
Also, your title for the next post kind of gave it away. Though since I've been reading your blog, the phrase "unbounded result set" is baked into my cerebellum, and it's also the major player in most of my nightmares.
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment10</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment10</guid><pubDate>Sat, 12 Mar 2011 21:29:13 GMT</pubDate></item><item><title>Corey commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>Using AutoMapper like this ends up littering the code-base with a ton of dependency on AutoMapper. You could easily reduce that dependency to one place with an extension method. posts.Map(update.Posts);
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment9</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment9</guid><pubDate>Sat, 12 Mar 2011 17:24:42 GMT</pubDate></item><item><title>kshitij commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>What did automapper really them?
  
  
Syntax for mapping seems quite verbose.
  
  
Seems like all it avoided was a foreach on the posts.
  
  
Couldn't they have just created a mapper class of type IMapper
&lt;from,to&gt;
 instantiated it once?
  
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment8</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment8</guid><pubDate>Sat, 12 Mar 2011 14:11:46 GMT</pubDate></item><item><title>Nick commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>Escaping output is usually handled by the view engine, pete. I don't think you could call that one a bug. But if they don't output encode in the view then you're right.
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment7</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment7</guid><pubDate>Fri, 11 Mar 2011 20:52:21 GMT</pubDate></item><item><title>Nick commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>There are actually 2 security vulnerabilities.
  
  
If no anti-forgery token is required (you can set this globally in MVC 3 with special filters) then they are open to csrf attacks.
  
  
I think the main point would be the passing around of ID's though as the poster above says. Pretty obvious.
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment6</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment6</guid><pubDate>Fri, 11 Mar 2011 20:51:00 GMT</pubDate></item><item><title>Corey commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>Once authenticated you can pass in whatever id's you want and there is no restriction to the logged in user.
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment5</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment5</guid><pubDate>Fri, 11 Mar 2011 13:59:04 GMT</pubDate></item><item><title>Ryan Heath commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>I think escaping is a responsibility of the view. 
  
In this case the conversion to Json.
  
  
It bothers me more that Time is converted to string.
  
-- .ForMember(dest =&gt; dest.Time, opt =&gt; opt.MapFrom(src =&gt; src.Time.ToString()))
  
  
// Ryan
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment4</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment4</guid><pubDate>Fri, 11 Mar 2011 13:43:16 GMT</pubDate></item><item><title>Pete commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>At first, I didn't like that "lastPost" input string was being sent to the Model if there was no updates - always a bad idea to echo user input to your output - but that looks safe as the "Parse" method is effectively validating user input (it will throw if the string is not a date string)
  
  
Next thing is that you are not escaping output: Owner.Name is not being escaped on output.  
  
  
Rule of thumb is to ALWAYS "validate input, escape output" and that will catch _alot_ of security issues.
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment3</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment3</guid><pubDate>Fri, 11 Mar 2011 12:39:49 GMT</pubDate></item><item><title>Walter Poch commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>I'm not sure how the system behaves but if there are some limitations in wich board a user can see, the security check is missing and the boardId is passed directly to the _postRepository, which isn't responsible of security concerns.
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment2</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment2</guid><pubDate>Fri, 11 Mar 2011 11:20:28 GMT</pubDate></item><item><title>Ryan Heath commented on Reviewing OSS Project: Whiteboard Chat&amp;ndash;setup belongs in the initializer</title><description>DateTime lastPostDateTime = DateTime.Parse(lastPost); 
  
  
They could have used DateTime.TryParse/.TryParseExact or 
  
change the type from string to DateTime.
  
DateTime.Parse will throw exceptions when lastPost cannot be parsed.
  
  
Ironically, in my spoken language 'lastPost' means 'menace' :)
  
  
// Ryan
</description><link>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment1</link><guid>http://ayende.com/4779/reviewing-oss-project-whiteboard-chat-setup-belongs-in-the-initializer#comment1</guid><pubDate>Fri, 11 Mar 2011 10:57:28 GMT</pubDate></item></channel></rss>