summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-22 15:58:57 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-24 15:42:25 +0100
commit986623e2acdb199fb5f929bb2242842726b50bf1 (patch)
treeba1ddea89f2e2497a1cd3e1161a8fcf74642ab89 /lib/base.php
parent3b35c226ce7ba755ec933b57e008a7748a9a0195 (diff)
downloadnextcloud-server-986623e2acdb199fb5f929bb2242842726b50bf1.tar.gz
nextcloud-server-986623e2acdb199fb5f929bb2242842726b50bf1.zip
Send a proper response for status.php on trusted domain error
* fixes #7732 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index d0672785cef..080b268795c 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -779,8 +779,16 @@ class OC {
$isScssRequest = true;
}
+ if(substr($request->getRequestUri(), -11) === '/status.php') {
+ OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
+ header('Status: 400 Bad Request');
+ header('Content-Type: application/json');
+ echo '{"error": "Trusted domain error.", "code": 15}';
+ exit();
+ }
+
if (!$isScssRequest) {
- header('HTTP/1.1 400 Bad Request');
+ OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
header('Status: 400 Bad Request');
\OC::$server->getLogger()->warning(