Empty commit

This commit is contained in:
Git 2013-03-16 08:00:25 +00:00
parent 548db5a3b5
commit ec1defb946
5 changed files with 8 additions and 12 deletions

View File

@ -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;"; $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; break;
case 'bounty': 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; break;
case 'artists': 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"; $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";

View File

@ -44,7 +44,7 @@
if ($UserID && strtotime($Expires)>time()) { if ($UserID && strtotime($Expires)>time()) {
// If the user has requested a password change, and his key has not expired // 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')); $Validate->SetFields('verifypassword','1','compare','Your passwords did not match.',array('comparefield'=>'password'));
if (!empty($_REQUEST['password'])) { if (!empty($_REQUEST['password'])) {

View File

@ -27,7 +27,7 @@
} elseif(OPEN_REGISTRATION || !empty($_REQUEST['invite'])) { } 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('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('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('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('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.'); $Val->SetFields('readwiki',true,'checkbox', 'You did not check the box that says you will read the wiki.');

View File

@ -31,7 +31,7 @@
$Val->SetFields('email',1,"email","You did not enter a valid email address."); $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('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('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')); $Val->SetFields('new_pass_2',1,"compare","Your passwords do not match.",array('comparefield'=>'new_pass_1'));
if (check_perms('site_advanced_search')) { if (check_perms('site_advanced_search')) {
$Val->SetFields('searchtype',1,"number","You forgot to select your default search preference.",array('minlength'=>0,'maxlength'=>1)); $Val->SetFields('searchtype',1,"number","You forgot to select your default search preference.",array('minlength'=>0,'maxlength'=>1));

View File

@ -127,13 +127,7 @@ function calculateComplexity(password) {
} }
function isStrongPassword(password) { function isStrongPassword(password) {
var toReturn = false; return /(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$/.test(password);
//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;
} }
function checkMatching(password1, password2) { function checkMatching(password1, password2) {