Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-04-23 14:01:20 +0300
committerJulius Härtl <jus@bitgrid.net>2021-04-26 15:53:09 +0300
commit981390d9485d5853e9306b425d41f1ad56998790 (patch)
treebcf19de07dcd9f0fc09b11194a5abf2a2e4ad5e9 /lib
parent3e2c2207ed73c07c3396f13d6163ff6d1ffe9941 (diff)
Let direct view return a proper error status code
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/DirectViewController.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Controller/DirectViewController.php b/lib/Controller/DirectViewController.php
index 5a43777b..b6616770 100644
--- a/lib/Controller/DirectViewController.php
+++ b/lib/Controller/DirectViewController.php
@@ -100,7 +100,9 @@ class DirectViewController extends Controller {
$params = [
'errors' => [['error' => $e->getMessage()]]
];
- return new TemplateResponse('core', 'error', $params, 'guest');
+ $response = new TemplateResponse('core', 'error', $params, 'guest');
+ $response->setStatus(Http::STATUS_FORBIDDEN);
+ return $response;
}
// Delete the token. They are for 1 time use only