From 021c423c6487691ad391cf3176faa35989fc159c Mon Sep 17 00:00:00 2001 From: jvvg Date: Thu, 27 Jun 2013 21:35:02 -0400 Subject: [PATCH] no numbers in codes --- ConfirmAccount/business/AccountRequestSubmission.php | 2 +- .../frontend/specialpages/actions/RequestAccount_body.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 .= '
'; $form .= 'User verification'; - $form .= '

Please go to the user verification project and comment the following code:
' . sha1($_SERVER['REMOTE_ADDR'] . date('m')) . '

' . "\n"; + $form .= '

Please go to the user verification project and comment the following code:
' . preg_replace('%\d+%', '', sha1($_SERVER['REMOTE_ADDR'] . date('m'))) . '

' . "\n"; $form .= '
'; //Set temporary password