summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/files.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-06-26 09:17:37 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-06-26 11:44:24 +0200
commit8c155cd51cb55c89f16d9bcfcb397d4e784ac108 (patch)
tree52aa69f7db242bb0382e374490526af13a2af9d2 /lib/private/legacy/files.php
parenta97cc293b5f04ee1d25a5e41103586f16ff02927 (diff)
downloadnextcloud-server-8c155cd51cb55c89f16d9bcfcb397d4e784ac108.tar.gz
nextcloud-server-8c155cd51cb55c89f16d9bcfcb397d4e784ac108.zip
Server error/hint pages with a 500 error code to avoid it being seen instead of the actual resource
* found while reviewing #7205 * allow to specify a special status code Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/legacy/files.php')
-rw-r--r--lib/private/legacy/files.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/legacy/files.php b/lib/private/legacy/files.php
index 00cd5fbfe51..f4474197d86 100644
--- a/lib/private/legacy/files.php
+++ b/lib/private/legacy/files.php
@@ -198,18 +198,18 @@ class OC_Files {
OC::$server->getLogger()->logException($ex);
$l = \OC::$server->getL10N('core');
$hint = method_exists($ex, 'getHint') ? $ex->getHint() : '';
- \OC_Template::printErrorPage($l->t('File is currently busy, please try again later'), $hint);
+ \OC_Template::printErrorPage($l->t('File is currently busy, please try again later'), $hint, 200);
} catch (\OCP\Files\ForbiddenException $ex) {
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
OC::$server->getLogger()->logException($ex);
$l = \OC::$server->getL10N('core');
- \OC_Template::printErrorPage($l->t('Can\'t read file'), $ex->getMessage());
+ \OC_Template::printErrorPage($l->t('Can\'t read file'), $ex->getMessage(), 200);
} catch (\Exception $ex) {
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
OC::$server->getLogger()->logException($ex);
$l = \OC::$server->getL10N('core');
$hint = method_exists($ex, 'getHint') ? $ex->getHint() : '';
- \OC_Template::printErrorPage($l->t('Can\'t read file'), $hint);
+ \OC_Template::printErrorPage($l->t('Can\'t read file'), $hint, 200);
}
}