mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #37316 from nextcloud/fix/security/strict-cookie-check-status-codes
fix(security)!: Use consistent HTTP status for strict cookie checks
This commit is contained in:
commit
5f879a705b
2 changed files with 6 additions and 1 deletions
|
|
@ -570,7 +570,9 @@ class OC {
|
|||
// Debug mode gets access to the resources without strict cookie
|
||||
// due to the fact that the SabreDAV browser also lives there.
|
||||
if (!$config->getSystemValue('debug', false)) {
|
||||
http_response_code(\OCP\AppFramework\Http::STATUS_SERVICE_UNAVAILABLE);
|
||||
http_response_code(\OCP\AppFramework\Http::STATUS_PRECONDITION_FAILED);
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(['error' => 'Strict Cookie has not been found in request']);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue