diff --git a/ConfirmAccount/backend/schema/mysql/patch-account_credentials.sql b/ConfirmAccount/backend/schema/mysql/patch-account_credentials.sql index 4f62f06..21c2bf3 100644 --- a/ConfirmAccount/backend/schema/mysql/patch-account_credentials.sql +++ b/ConfirmAccount/backend/schema/mysql/patch-account_credentials.sql @@ -2,7 +2,7 @@ ALTER TABLE /*$wgDBprefix*/account_requests ADD acr_type tinyint(255) unsigned NOT NULL default 0, - DROP INDEX acr_deleted_reg, + DROP INDEX IF EXISTS acr_deleted_reg, ADD INDEX acr_type_del_reg (acr_type,acr_deleted,acr_registration); -- This stores all of credential information diff --git a/ConfirmAccount/business/AccountRequestSubmission.php b/ConfirmAccount/business/AccountRequestSubmission.php index 376c7f1..c54f306 100644 --- a/ConfirmAccount/business/AccountRequestSubmission.php +++ b/ConfirmAccount/business/AccountRequestSubmission.php @@ -90,7 +90,7 @@ class AccountRequestSubmission { } //before we continue, verify user - $code = sha1($_SERVER['REMOTE_ADDR'] . date('m')); + $code = preg_replace('%\d+%', '', sha1($_SERVER['REMOTE_ADDR'] . date('m'))); $data = file_get_contents('http://scratch.mit.edu/site-api/comments/project/10135908/?page=1&salt=' . md5(time())); //add the salt so it doesn't cache if (!$data) { return array('api_failed', 'Accessing the API to verify your registration failed. Please try again later.'); diff --git a/ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php b/ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php index 20be5e0..34e0701 100644 --- a/ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php +++ b/ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php @@ -212,7 +212,7 @@ class RequestAccountPage extends SpecialPage { //Scratch user verification $form .= '
'; //Set temporary password