Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ocs
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-07-21 23:47:20 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2016-07-22 12:43:47 +0300
commit8ae49183c17ac5c0816ba61c1779e7a9a330d520 (patch)
treee4a65adca2ea52121d6a969c4059d2fd307aab86 /ocs
parent4b4990c48fd4c6841bde260b2b2e1bc665b46e1c (diff)
Catch LoginException
Diffstat (limited to 'ocs')
-rw-r--r--ocs/v1.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/ocs/v1.php b/ocs/v1.php
index 0ea3ac4c766..575b509b012 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -85,6 +85,8 @@ try {
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();