- fix bug that made email address validation worthless

(from Janus K.).  Fixes #718


svn path=/trunk/boinc/; revision=15813
This commit is contained in:
David Anderson 2008-08-13 02:53:43 +00:00
parent c480c46a9f
commit 54081d3eeb
1 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,8 @@ require_once("../inc/email.inc");
function send_validate_email() { function send_validate_email() {
global $master_url; global $master_url;
$user = get_logged_in_user(); $user = get_logged_in_user();
$x2 = md5($user->email_addr.$user->authenticator); $x2 = uniqid(rand(), true);
$user->update("signature='$x2'");
send_email( send_email(
$user, $user,
"Validate BOINC email address", "Validate BOINC email address",
@ -47,7 +48,7 @@ function validate() {
error_page("No such user.\n"); error_page("No such user.\n");
} }
$x2 = md5($user->email_addr.$user->authenticator); $x2 = $user->signature;
if ($x2 != $x) { if ($x2 != $x) {
error_page("Error in URL data - can't validate email address"); error_page("Error in URL data - can't validate email address");
} }