summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/api.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/legacy/api.php')
-rw-r--r--lib/private/legacy/api.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/legacy/api.php b/lib/private/legacy/api.php
index bab879c95f8..702b9df1927 100644
--- a/lib/private/legacy/api.php
+++ b/lib/private/legacy/api.php
@@ -356,7 +356,11 @@ class OC_API {
if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']) ) {
$authUser = $_SERVER['PHP_AUTH_USER'];
$authPw = $_SERVER['PHP_AUTH_PW'];
- $return = OC_User::login($authUser, $authPw);
+ try {
+ $return = OC_User::login($authUser, $authPw);
+ } catch (\OC\User\LoginException $e) {
+ return false;
+ }
if ($return === true) {
self::$logoutRequired = true;