From f715b5ea2e1b75498e253181b4ed74847ba90a08 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 9 Sep 2016 13:52:34 +0200 Subject: Don't print exception message in HTML The exception message is potentially influenced by user input and could thus be confusing (e.g. somebody could try to open a file like "Please send a mail to support@foo.com", and then the message would include that string. It is thus reasonable to not show the exception message by default. Also for the browser view I added an `exit()` at the end, as otherwise the XML exception would be attached. --- apps/dav/lib/Files/BrowserErrorPagePlugin.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'apps/dav/lib/Files') diff --git a/apps/dav/lib/Files/BrowserErrorPagePlugin.php b/apps/dav/lib/Files/BrowserErrorPagePlugin.php index 8c257b324b9..b58ce4df874 100644 --- a/apps/dav/lib/Files/BrowserErrorPagePlugin.php +++ b/apps/dav/lib/Files/BrowserErrorPagePlugin.php @@ -31,7 +31,6 @@ use Sabre\DAV\Server; use Sabre\DAV\ServerPlugin; class BrowserErrorPagePlugin extends ServerPlugin { - /** @var Server */ private $server; @@ -88,8 +87,7 @@ class BrowserErrorPagePlugin extends ServerPlugin { /** * @codeCoverageIgnore - * @param \Exception $ex - * @param int $httpCode + * @param \Exception $exception * @return bool|string */ public function generateBody(\Exception $exception) { @@ -109,10 +107,11 @@ class BrowserErrorPagePlugin extends ServerPlugin { return $content->fetchPage(); } - /* + /** * @codeCoverageIgnore */ public function sendResponse() { $this->server->sapi->sendResponse($this->server->httpResponse); + exit(); } } -- cgit v1.2.3