summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-01-24 15:05:49 +0100
committerGitHub <noreply@github.com>2018-01-24 15:05:49 +0100
commitabb17589b144cd7676112eba965f4d5b8470d0f6 (patch)
tree38140194870b6c63178afae743d288f7bb4ab516 /lib/base.php
parent03072c3914d51c72897ab576468fd064d3cef0e2 (diff)
parent37026d8b9d88cb9131bef4070e015e2252e9025c (diff)
downloadnextcloud-server-abb17589b144cd7676112eba965f4d5b8470d0f6.tar.gz
nextcloud-server-abb17589b144cd7676112eba965f4d5b8470d0f6.zip
Merge pull request #7991 from nextcloud/show-trusted-domain-error-in-status.php
Send a proper response for status.php on trusted domain error
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 6e66005b28f..590ca42040f 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -757,8 +757,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(