From bab8b29c5b6d444463985f52dd6e0bf419ae5795 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 6 Aug 2023 18:22:39 +0000 Subject: [PATCH] Fixed error 500 when trying to log in to a non-existing user. --- public-legacy/auth/login.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public-legacy/auth/login.php b/public-legacy/auth/login.php index dede822..c840ad8 100644 --- a/public-legacy/auth/login.php +++ b/public-legacy/auth/login.php @@ -93,7 +93,7 @@ while(!empty($_POST['login']) && is_array($_POST['login'])) { try { $userInfo = $users->getUser($_POST['login']['username'], 'login'); - } catch(RuntimeException $ex) { + } catch(Exception $ex) { $loginAttempts->recordAttempt(false, $ipAddress, $countryCode, $userAgent, $clientInfo); $notices[] = $loginFailedError; break; @@ -131,7 +131,7 @@ while(!empty($_POST['login']) && is_array($_POST['login'])) { try { $sessionInfo = $sessions->createSession($userInfo, $ipAddress, $countryCode, $userAgent, $clientInfo); - } catch(RuntimeException $ex) { + } catch(Exception $ex) { $notices[] = "Something broke while creating a session for you, please tell an administrator or developer about this!"; break; }