diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-22 17:58:57 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-22 17:58:57 +0300 |
commit | 37026d8b9d88cb9131bef4070e015e2252e9025c (patch) | |
tree | 2575c0de72f7e81b072bf740228bd0177ca834c9 /lib/base.php | |
parent | 1194e4c2bd6da09c975935d9f139052cfff9091e (diff) |
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.php | 10 |
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( |