From 8ae49183c17ac5c0816ba61c1779e7a9a330d520 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 21 Jul 2016 22:47:20 +0200 Subject: [PATCH 1/2] Catch LoginException --- ocs/v1.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ocs/v1.php b/ocs/v1.php index 0ea3ac4c766a4..575b509b012b5 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -85,6 +85,8 @@ OC_Response::setStatus(405); } catch (\OC\OCS\Exception $ex) { OC_API::respond($ex->getResult(), OC_API::requestedFormat()); +} catch (\OC\User\LoginException $e) { + OC_API::respond(new OC_OCS_Result(null, \OCP\API::RESPOND_UNAUTHORISED, 'Unauthorised')); } catch (\Exception $e) { OC_API::setContentType(); OC_OCS::notFound(); From 67ce87dca718bb45764e85aaec58aa803b645154 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 22 Jul 2016 08:27:16 +0200 Subject: [PATCH 2/2] Fix intergration tests --- build/integration/features/provisioning-v1.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/integration/features/provisioning-v1.feature b/build/integration/features/provisioning-v1.feature index 135c67dc3a675..487e025092bc8 100644 --- a/build/integration/features/provisioning-v1.feature +++ b/build/integration/features/provisioning-v1.feature @@ -508,6 +508,6 @@ Feature: provisioning And assure user "user0" is disabled And As an "user0" When sending "GET" to "/index.php/apps/files" - Then the OCS status code should be "999" - And the HTTP status code should be "200" + Then the OCS status code should be "997" + And the HTTP status code should be "401"