| @@ 40-48 (lines=9) @@ | ||
| 37 | // |
|
| 38 | function login_with_email($email_addr, $passwd, $next_url, $perm) { |
|
| 39 | $user = BoincUser::lookup_email_addr($email_addr); |
|
| 40 | if (!$user) { |
|
| 41 | sleep(LOGIN_FAIL_SLEEP_SEC); |
|
| 42 | page_head("No such account"); |
|
| 43 | echo "No account with email address <b>$email_addr</b> exists. |
|
| 44 | Please go back and try again. |
|
| 45 | "; |
|
| 46 | page_tail(); |
|
| 47 | exit; |
|
| 48 | } |
|
| 49 | if (substr($user->authenticator, 0, 1) == 'x'){ |
|
| 50 | sleep(LOGIN_FAIL_SLEEP_SEC); |
|
| 51 | error_page("This account has been administratively disabled."); |
|
| @@ 59-65 (lines=7) @@ | ||
| 56 | if ($passwd != $user->authenticator) { |
|
| 57 | $passwd_hash = md5($passwd.$email_addr); |
|
| 58 | ||
| 59 | if (!check_passwd_hash($user, $passwd_hash)) { |
|
| 60 | sleep(LOGIN_FAIL_SLEEP_SEC); |
|
| 61 | page_head("Password incorrect"); |
|
| 62 | echo "The password you entered is incorrect. Please go back and try again.\n"; |
|
| 63 | page_tail(); |
|
| 64 | exit; |
|
| 65 | } |
|
| 66 | } |
|
| 67 | $authenticator = $user->authenticator; |
|
| 68 | Header("Location: ".url_base()."$next_url"); |
|
| @@ 59-65 (lines=7) @@ | ||
| 56 | ||
| 57 | function check_passwd_ui($user, $passwd) { |
|
| 58 | $passwd_hash = md5($passwd.$user->email_addr); |
|
| 59 | if(!check_passwd_hash($user, $passwd_hash)) { |
|
| 60 | sleep(LOGIN_FAIL_SLEEP_SEC); |
|
| 61 | page_head("Password incorrect"); |
|
| 62 | echo "The password you entered is incorrect. Please go back and try again.\n"; |
|
| 63 | page_tail(); |
|
| 64 | exit; |
|
| 65 | } |
|
| 66 | } |
|
| 67 | ||
| 68 | function is_banned_email_addr($email_addr) { |
|