From 0480a3858668197bf17977823cfd4cff6b40a9ce Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 2 May 2008 20:29:32 +0000 Subject: [PATCH] - web: improve error messages if login link fails (URL may have been truncated in email reader) svn path=/trunk/boinc/; revision=15126 --- checkin_notes | 8 ++++++++ html/user/login_action.php | 14 ++++++++++++-- html/user/white.css | 1 + 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 97c9797a9f..7450ca284d 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/html/user/login_action.php b/html/user/login_action.php index 1dc7b96f59..4987e6a5fb 100644 --- a/html/user/login_action.php +++ b/html/user/login_action.php @@ -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 here to diff --git a/html/user/white.css b/html/user/white.css index ffca6ca021..0880453d85 100644 --- a/html/user/white.css +++ b/html/user/white.css @@ -70,6 +70,7 @@ td.category { td.navbar { border: 0px; text-align: center; + vertival-align: middle; } a.navbar:link {