From 6d3757f8648cb94b2ba04c6a5bfbc9dd1493103b Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Thu, 11 Sep 2014 14:14:02 +0200 Subject: Do not show exception to the end-user Log the error instead of potentially leaking sensitive information --- index.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 061391892fe..88d5733cb37 100755 --- a/index.php +++ b/index.php @@ -33,6 +33,9 @@ try { //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); OC_Template::printExceptionErrorPage($ex); +} catch (\OC\HintException $ex) { + OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); + OC_Template::printErrorPage($ex->getMessage(), $ex->getHint()); } catch (Exception $ex) { \OCP\Util::logException('index', $ex); -- cgit v1.2.3