<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>Peter&#039;s Useful Crap - Topic: Minor password and username length validation bug in Version 1.2</title>
	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/minor-password-and-username-length-validation-bug-in-version-12</link>
	<description><![CDATA[Useful tips on Canada, cell phones, banking, technology, WordPress, PHP and more]]></description>
	<generator>Simple:Press Version 5.5.1</generator>
	<atom:link href="http://www.theblog.ca/peter-forum/peters-sports-league-standings/minor-password-and-username-length-validation-bug-in-version-12/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Peter on Minor password and username length validation bug in Version 1.2</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/minor-password-and-username-length-validation-bug-in-version-12#p609</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/minor-password-and-username-length-validation-bug-in-version-12#p609</guid>
        	        	<description><![CDATA[<p>I just discovered a minor bug.  User passwords are supposed to be validated between 4 and 15 characters, but in fact I messed up in the code — it tests for between 5 and 14 characters and balks when a password is exactly 4 or 15 characters.  The same issue goes for usernames, which are supposed to be between 2 and 15 characters.  For those who have experienced the problem it must be really annoying!</p>
<p>Anyway, the fix is in permission_functions.php:</p>
<p>Replace this:</p>
<p><input type="button" class="sfcodeselect" name="sfselectit7520" value="Select Code" onclick="spjSelectCode('sfcode7520');" /></p>
<div class="sfcode" id="sfcode7520">if ($password_length &#60;= 4 &#124;&#124; $password_length &#62;= 15 ) {</div>
<p>With this:</p>
<p><input type="button" class="sfcodeselect" name="sfselectit5662" value="Select Code" onclick="spjSelectCode('sfcode5662');" /></p>
<div class="sfcode" id="sfcode5662">if ($password_length &#60; 4 &#124;&#124; $password_length &#62; 15 ) {</div>
<p>Also, replace:</p>
<p><input type="button" class="sfcodeselect" name="sfselectit2174" value="Select Code" onclick="spjSelectCode('sfcode2174');" /></p>
<div class="sfcode" id="sfcode2174">if ($username_length &#60;= 2 &#124;&#124; $username_length &#62;= 15 ) {</div>
<p>With:</p>
<p><input type="button" class="sfcodeselect" name="sfselectit9682" value="Select Code" onclick="spjSelectCode('sfcode9682');" /></p>
<div class="sfcode" id="sfcode9682">if ($username_length &#60; 2 &#124;&#124; $username_length &#62; 15 ) {</div>
<p>I’ve cheated and fixed this in the existing 1.2 version.  It will also be included in subsequent releases when I one day start on that again.</p>
]]></description>
        	        	<pubDate>Fri, 05 Sep 2008 18:45:15 +0000</pubDate>
        </item>
</channel>
</rss>