mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #7991 from nextcloud/show-trusted-domain-error-in-status.php
Send a proper response for status.php on trusted domain error
This commit is contained in:
commit
abb17589b1
1 changed files with 9 additions and 1 deletions
10
lib/base.php
10
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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue