<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Less Post More GET &#187; ruby on rails</title>
	<atom:link href="http://lesspostmoreget.com/tag/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://lesspostmoreget.com</link>
	<description>Thoughts on software development and the web</description>
	<lastBuildDate>Wed, 09 Nov 2011 20:02:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='lesspostmoreget.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Less Post More GET &#187; ruby on rails</title>
		<link>http://lesspostmoreget.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://lesspostmoreget.com/osd.xml" title="Less Post More GET" />
	<atom:link rel='hub' href='http://lesspostmoreget.com/?pushpress=hub'/>
		<item>
		<title>Login forms are broken in ruby on rails</title>
		<link>http://lesspostmoreget.com/2009/08/14/login-forms-are-broken/</link>
		<comments>http://lesspostmoreget.com/2009/08/14/login-forms-are-broken/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 12:46:08 +0000</pubDate>
		<dc:creator>wiscoDude</dc:creator>
				<category><![CDATA[software security]]></category>
		<category><![CDATA[software usability]]></category>
		<category><![CDATA[don't do this]]></category>
		<category><![CDATA[risk management]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://lesspostmoreget.com/?p=36</guid>
		<description><![CDATA[Risk mitigation of user name guessing is not done by obtuse error messages displayed back to the user.  If you want to mitigate this risk, you need to use data.  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lesspostmoreget.com&amp;blog=8898282&amp;post=36&amp;subd=lesspostmoreget&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It isn&#8217;t <strong>just</strong> Ruby on Rails login forms that are broken. The <strong>majority of login forms</strong> on the internet are fundamentally broken.</p>
<p>In what appears to be some form of risk management strategy, these login forms introduce a different risk to the websites that use the default behaviors &#8211; in RoR sites, this is often either AuthLogic or RestfulAuthentication.</p>
<p>Both are broken in a big way.</p>
<p><span id="more-36"></span>First, the bug.  And you might not even recognize it is a bug because the behaviour is so wide spread, so ingrained, and so &#8220;sensible&#8221;.</p>
<p>On almost every login form, if I submit <strong>either</strong> the wrong username <strong>OR</strong> the wrong password.  I get the same error message.  Usually it&#8217;ll be something brief like the following.<br />
<img class="alignnone size-full wp-image-37" title="bad form" src="http://lesspostmoreget.files.wordpress.com/2009/08/picture-3.png?w=490" alt="bad form"   /></p>
<p>Notice the very important word in this message.  <strong>OR</strong>.  Because the error message is the same if I enter the wrong user name OR the wrong password, I don&#8217;t know which piece of data I entered incorrectly.</p>
<p>I&#8217;m guessing virtually everyone reading this is now thinking &#8220;well yeah, if you tell them which piece is wrong, someone can keep guessing until they get it right.&#8221;</p>
<p>Before we get into that, what are the risks being mitigated in this process?  You don&#8217;t want someone to hack into one of your user&#8217;s accounts, right?</p>
<p>Right.</p>
<p>But what else?  How about the risk that someone, a new user, comes back to your site and has forgotten which password they are using?  Maybe <a href="http://lesspostmoreget.com/2008/03/22/passwords-gone-wild/">you forced them to use some complex password</a>.  Maybe not.  In any case, maybe they want to use your site, but it isn&#8217;t really <strong>that</strong> important.  As web app builders, we&#8217;re constantly thinking about lowering the barriers to join and begin using a web application, right? Why would we add a barrier here.  It is possible that a user with difficulties signing in might just leave.  Never to come back.  Never to <strong>pay you</strong> for your service.</p>
<p>All because you were not kind in telling him/her why the credentials they gave on login didn&#8217;t work.</p>
<p>So, that&#8217;s a risk.  And for a startup, this is a significant risk.  You need every new user you can get.  Especially those people that have taken the time to actually create an account.</p>
<p>But let&#8217;s get back to the &#8220;common sense&#8221; reason for not telling the user more about why their credentials didn&#8217;t work.</p>
<p>You may notice on the signin form above, that link to &#8220;<strong>Forgot</strong>&#8220;.  If you click that link and enter a user name (email address in this case), the <strong>system will almost always tell you if that user name exists</strong>.  Using the above site, it&#8217;ll look like this.</p>
<p><img class="alignnone size-full wp-image-40" title="forgot password" src="http://lesspostmoreget.files.wordpress.com/2009/08/picture-41.png?w=490" alt="forgot password"   /></p>
<p>So, lemme just repeat the problem.</p>
<blockquote><p>Login forms <strong>almost never</strong> tell you if your user name is wrong</p></blockquote>
<p>Compared with</p>
<blockquote><p>Forgot password forms <strong>almost always</strong> tell you if your user name is wrong</p></blockquote>
<p>So let&#8217;s get back to that risk that is supposedly being mitigated by not telling the form submitter what piece of data is wrong.  We&#8217;re trying to keep people from guessing user names, right?  And yet <strong>we provide a form for doing exactly that</strong>!</p>
<p>The risk is not mitigated in the slightest by the error message.  Not one bit.</p>
<p>Now, I&#8217;m not going to go into how this process should be done.  For two reasons.  One, I&#8217;m out of time for writing this morning.  And Two, because <strong>I want people to disagree with me</strong> so I can understand their thought process.  It is possible I&#8217;m missing something here.  Unlikely, but possible.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lesspostmoreget.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lesspostmoreget.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lesspostmoreget.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lesspostmoreget.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lesspostmoreget.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lesspostmoreget.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lesspostmoreget.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lesspostmoreget.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lesspostmoreget.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lesspostmoreget.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lesspostmoreget.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lesspostmoreget.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lesspostmoreget.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lesspostmoreget.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lesspostmoreget.com&amp;blog=8898282&amp;post=36&amp;subd=lesspostmoreget&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lesspostmoreget.com/2009/08/14/login-forms-are-broken/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c2364a84209fd7f40a9d77e5b11d5d2f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wiscoDude</media:title>
		</media:content>

		<media:content url="http://lesspostmoreget.files.wordpress.com/2009/08/picture-3.png" medium="image">
			<media:title type="html">bad form</media:title>
		</media:content>

		<media:content url="http://lesspostmoreget.files.wordpress.com/2009/08/picture-41.png" medium="image">
			<media:title type="html">forgot password</media:title>
		</media:content>
	</item>
	</channel>
</rss>
