diff --git a/classes/class_user_rank.php b/classes/class_user_rank.php index 7b93acba..3099b1bf 100644 --- a/classes/class_user_rank.php +++ b/classes/class_user_rank.php @@ -48,8 +48,10 @@ function table_query($TableName) { $Query = "SELECT COUNT(p.ID) AS Posts FROM users_main AS um JOIN forums_posts AS p ON p.AuthorID=um.ID WHERE um.Enabled='1' GROUP BY um.ID ORDER BY Posts;"; break; case 'bounty': - //Request bunny exception - $Query = "SELECT SUM(rv.Bounty) AS Bounty FROM users_main AS um JOIN requests_votes AS rv ON rv.UserID=um.ID WHERE um.Enabled='1' AND um.ID <> 260542 GROUP BY um.ID ORDER BY Bounty;"; + + + $Query = "SELECT SUM(rv.Bounty) AS Bounty FROM users_main AS um JOIN requests_votes AS rv ON rv.UserID=um.ID WHERE um.Enabled='1' GROUP BY um.ID ORDER BY Bounty;"; + break; case 'artists': $Query = "SELECT COUNT(ta.ArtistID) AS Artists FROM torrents_artists AS ta JOIN torrents_group AS tg ON tg.ID=ta.GroupID JOIN torrents AS t ON t.GroupID = tg.ID WHERE t.UserID != ta.UserID GROUP BY tg.ID ORDER BY Artists ASC"; diff --git a/sections/login/index.php b/sections/login/index.php index 1dbc6e18..28b91275 100644 --- a/sections/login/index.php +++ b/sections/login/index.php @@ -44,7 +44,7 @@ if ($UserID && strtotime($Expires)>time()) { // If the user has requested a password change, and his key has not expired - $Validate->SetFields('password','1','regex','You entered an invalid password. A strong password is between 8 and 40 characters long, contains at least 1 lowercase and uppercase letter, contains at least a number or symbol',array('regex' => '/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/')); + $Validate->SetFields('password','1','regex','You entered an invalid password. A strong password is between 8 and 40 characters long, contains at least 1 lowercase and uppercase letter, contains at least a number or symbol',array('regex' => '/(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$/')); $Validate->SetFields('verifypassword','1','compare','Your passwords did not match.',array('comparefield'=>'password')); if (!empty($_REQUEST['password'])) { diff --git a/sections/register/index.php b/sections/register/index.php index 81868d84..2dfb90d0 100644 --- a/sections/register/index.php +++ b/sections/register/index.php @@ -27,7 +27,7 @@ } elseif(OPEN_REGISTRATION || !empty($_REQUEST['invite'])) { $Val->SetFields('username',true,'regex', 'You did not enter a valid username.',array('regex'=>'/^[a-z0-9_?]{1,20}$/iD')); $Val->SetFields('email',true,'email', 'You did not enter a valid email address.'); - $Val->SetFields('password',true,'regex','A strong password is between 8 and 40 characters long, contains at least 1 lowercase and uppercase letter, and contains at least a number or symbol',array('regex'=>'/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/')); + $Val->SetFields('password',true,'regex','A strong password is between 8 and 40 characters long, contains at least 1 lowercase and uppercase letter, and contains at least a number or symbol',array('regex'=>'/(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$/')); $Val->SetFields('confirm_password',true,'compare', 'Your passwords do not match.',array('comparefield'=>'password')); $Val->SetFields('readrules',true,'checkbox', 'You did not check the box that says you will read the rules.'); $Val->SetFields('readwiki',true,'checkbox', 'You did not check the box that says you will read the wiki.'); diff --git a/sections/user/takeedit.php b/sections/user/takeedit.php index dae007b1..58b4a8d5 100644 --- a/sections/user/takeedit.php +++ b/sections/user/takeedit.php @@ -31,7 +31,7 @@ $Val->SetFields('email',1,"email","You did not enter a valid email address."); $Val->SetFields('irckey',0,"string","You did not enter a valid IRCKey, must be between 6 and 32 characters long.",array('minlength'=>6,'maxlength'=>32)); $Val->SetFields('cur_pass',0,"string","You did not enter a valid password, must be at least 6 characters long.",array('minlength'=>6,'maxlength'=>150)); -$Val->SetFields('new_pass_1',0,"regex","You did not enter a valid password. A strong password is between 8 and 40 characters long contains at least 1 lowercase and uppercase letter, contains at least a number or symbol",array('regex'=>'/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/')); +$Val->SetFields('new_pass_1',0,"regex","You did not enter a valid password. A strong password is between 8 and 40 characters long contains at least 1 lowercase and uppercase letter, contains at least a number or symbol",array('regex'=>'/(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$/')); $Val->SetFields('new_pass_2',1,"compare","Your passwords do not match.",array('comparefield'=>'new_pass_1')); if (check_perms('site_advanced_search')) { $Val->SetFields('searchtype',1,"number","You forgot to select your default search preference.",array('minlength'=>0,'maxlength'=>1)); diff --git a/static/functions/password_validate.js b/static/functions/password_validate.js index 2786200b..924fd76a 100644 --- a/static/functions/password_validate.js +++ b/static/functions/password_validate.js @@ -127,13 +127,7 @@ function calculateComplexity(password) { } function isStrongPassword(password) { - var toReturn = false; - //var regex = /^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$/; - var regex = /(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/; - if(regex.test(password)) { - toReturn = true; - } - return toReturn; + return /(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$/.test(password); } function checkMatching(password1, password2) {