mirror of https://github.com/BOINC/boinc.git
- web: improve error messages if login link fails
(URL may have been truncated in email reader) svn path=/trunk/boinc/; revision=15126
This commit is contained in:
parent
6e6fab3e7c
commit
0480a38586
|
@ -3553,3 +3553,11 @@ David May 2 2008
|
|||
sched_result.C
|
||||
sched_send.C
|
||||
server_types.C,h
|
||||
|
||||
David May 2 2008
|
||||
- web: improve error messages if login link fails
|
||||
(URL may have been truncated in email reader)
|
||||
|
||||
html/user/
|
||||
login_action.php
|
||||
white.css
|
||||
|
|
|
@ -52,11 +52,21 @@ $t = get_int('t', true);
|
|||
$h = get_str('h', true);
|
||||
if ($id && $t && $h) {
|
||||
$user = BoincUser::lookup_id($id);
|
||||
if (!$user) error_page("no such user");
|
||||
if (!$user) {
|
||||
error_page("Invalid user ID.
|
||||
Please make sure you visited the complete URL;
|
||||
it may have been split across lines by your email reader."
|
||||
);
|
||||
}
|
||||
$x = $id.$user->authenticator.$t;
|
||||
$x = md5($x);
|
||||
$x = substr($x, 0, 16);
|
||||
if ($x != $h) error_page("bad hash");
|
||||
if ($x != $h) {
|
||||
error_page("Invalid authenticator.
|
||||
Please make sure you visited the complete URL;
|
||||
it may have been split across lines by your email reader."
|
||||
);
|
||||
}
|
||||
if (time() - $t > 86400) {
|
||||
error_page("Link has expired;
|
||||
go <a href=get_passwd.php>here</a> to
|
||||
|
|
|
@ -70,6 +70,7 @@ td.category {
|
|||
td.navbar {
|
||||
border: 0px;
|
||||
text-align: center;
|
||||
vertival-align: middle;
|
||||
}
|
||||
|
||||
a.navbar:link {
|
||||
|
|
Loading…
Reference in New Issue