From bbbad09383affbb8db59b13ac34047a61efc2f36 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 22 Sep 2016 12:18:40 +0200 Subject: [PATCH 1/2] Return 404 on v2.php when the app is disabled Signed-off-by: Joas Schilling --- lib/private/legacy/ocs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/legacy/ocs.php b/lib/private/legacy/ocs.php index 2ed17e7dae..a03cba7bc1 100644 --- a/lib/private/legacy/ocs.php +++ b/lib/private/legacy/ocs.php @@ -37,7 +37,7 @@ class OC_OCS { $format = \OC::$server->getRequest()->getParam('format', 'xml'); $txt='Invalid query, please check the syntax. API specifications are here:' .' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:'."\n"; - OC_API::respond(new OC_OCS_Result(null, API::RESPOND_UNKNOWN_ERROR, $txt), $format); + OC_API::respond(new OC_OCS_Result(null, API::RESPOND_NOT_FOUND, $txt), $format); } } From 2f01c97e97e201bb621df9d4fc6a27df233bacc4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 27 Sep 2016 11:50:46 +0200 Subject: [PATCH 2/2] Request a valid resource Signed-off-by: Joas Schilling --- build/integration/features/provisioning-v1.feature | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build/integration/features/provisioning-v1.feature b/build/integration/features/provisioning-v1.feature index 79ec0cf4db..eaec7c52ce 100644 --- a/build/integration/features/provisioning-v1.feature +++ b/build/integration/features/provisioning-v1.feature @@ -500,7 +500,7 @@ Feature: provisioning Given As an "admin" And user "user0" exists And As an "user0" - When sending "GET" to "/index.php/apps/files" + When sending "GET" to "/cloud/capabilities" Then the HTTP status code should be "200" Scenario: Making a web request with a disabled user @@ -508,7 +508,6 @@ Feature: provisioning And user "user0" exists 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" - + When sending "GET" to "/cloud/capabilities" + Then the OCS status code should be "997" + And the HTTP status code should be "401"