aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-22 15:58:57 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-22 15:58:57 +0100
commit37026d8b9d88cb9131bef4070e015e2252e9025c (patch)
tree2575c0de72f7e81b072bf740228bd0177ca834c9 /lib
parent1194e4c2bd6da09c975935d9f139052cfff9091e (diff)
downloadnextcloud-server-37026d8b9d88cb9131bef4070e015e2252e9025c.tar.gz
nextcloud-server-37026d8b9d88cb9131bef4070e015e2252e9025c.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')
-rw-r--r--lib/base.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index f763ee634f3..ec7c8066cc2 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(