diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-07-27 15:28:35 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-07-27 15:28:35 +0200 |
commit | 8bdd0adceecfa7382140022819546acae61ed0a5 (patch) | |
tree | ff968085de18a5b43a493c656720314e68657b8c /lib | |
parent | 10726dd00df37be77c3088302e16e64b09a6d25f (diff) | |
download | nextcloud-server-8bdd0adceecfa7382140022819546acae61ed0a5.tar.gz nextcloud-server-8bdd0adceecfa7382140022819546acae61ed0a5.zip |
Support subdir in the OCS v2 endpoint
We should check against the ending substring since people could
run their nextcloud in a subfolder.
* Added test
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AppFramework/Middleware/OCSMiddleware.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Middleware/OCSMiddleware.php b/lib/private/AppFramework/Middleware/OCSMiddleware.php index 0d97aa6ed94..e07d100d8ac 100644 --- a/lib/private/AppFramework/Middleware/OCSMiddleware.php +++ b/lib/private/AppFramework/Middleware/OCSMiddleware.php @@ -58,7 +58,7 @@ class OCSMiddleware extends Middleware { } $response = new OCSResponse($format, $code, $exception->getMessage()); - if ($this->request->getScriptName() === '/ocs/v2.php') { + if (substr_compare($this->request->getScriptName(), '/ocs/v2.php', -strlen('/ocs/v2.php')) === 0) { $response->setStatus($code); } return $response; |