From: anuko Date: Fri, 5 Jan 2018 17:46:01 +0000 (+0000) Subject: Improved handling of old_password() function not found situation. X-Git-Tag: timetracker_1.19-1~1404 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/commitdiff_plain/58d005dd74e63575f7dc1e9f79e54be2f314651b Improved handling of old_password() function not found situation. --- diff --git a/WEB-INF/lib/auth/Auth_db.class.php b/WEB-INF/lib/auth/Auth_db.class.php index 4861552c..dccc9823 100644 --- a/WEB-INF/lib/auth/Auth_db.class.php +++ b/WEB-INF/lib/auth/Auth_db.class.php @@ -71,7 +71,10 @@ class Auth_db extends Auth { WHERE login = ".$mdb2->quote($login)." AND password = old_password(".$mdb2->quote($password).") AND status = 1"; $res = $mdb2->query($sql); if (is_a($res, 'PEAR_Error')) { - die($res->getMessage()); + return false; // Simply return false for a meaningful error message on screen, see the comment below. + // die($res->getMessage()); // old_password() function is removed in MySQL 5.7.5. + // We are getting a confusing "MDB2 Error: not found" in this case if we die. + // TODO: perhaps it's time to simplify things and remove handling of old passwords completely. } $val = $res->fetchRow(); if ($val['id'] > 0) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index abc0e45d..ab9fbcc7 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.6.3718 | Copyright © Anuko | +  Anuko Time Tracker 1.13.7.3719 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}