Arrow

Minor password and username length validation bug in Version 1.2 | Peter's Sports League Standings | Forum

Back to the sports standings script page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Minor password and username length validation bug in Version 1.2
September 5, 2008
6:45 pm
Peter
Admin
Forum Posts: 841
Offline

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!

Anyway, the fix is in permission_functions.php:

Replace this:

if ($password_length <= 4 || $password_length >= 15 ) {

With this:

if ($password_length < 4 || $password_length > 15 ) {

Also, replace:

if ($username_length <= 2 || $username_length >= 15 ) {

With:

if ($username_length < 2 || $username_length > 15 ) {

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.