summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-09-09 14:57:23 +0200
committerGitHub <noreply@github.com>2016-09-09 14:57:23 +0200
commit3fc37b2fc59f037c2da53a94207f43b1497eaaec (patch)
treeec4f28e48f58c1bada5e10a95891c89b9725752c
parentf6c7b4e6ebe9c16d4cdd6ac79748bec8eb2dc7eb (diff)
parentf715b5ea2e1b75498e253181b4ed74847ba90a08 (diff)
downloadnextcloud-server-3fc37b2fc59f037c2da53a94207f43b1497eaaec.tar.gz
nextcloud-server-3fc37b2fc59f037c2da53a94207f43b1497eaaec.zip
Merge pull request #1342 from nextcloud/throw-exceptions-not-printable
Don't print exception message in HTML
-rw-r--r--apps/dav/lib/Files/BrowserErrorPagePlugin.php7
-rw-r--r--apps/dav/templates/exception.php5
2 files changed, 5 insertions, 7 deletions
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();
}
}
diff --git a/apps/dav/templates/exception.php b/apps/dav/templates/exception.php
index ff3d1f3d20d..c4abd205bfc 100644
--- a/apps/dav/templates/exception.php
+++ b/apps/dav/templates/exception.php
@@ -1,7 +1,5 @@
<?php
/**
-
- *
* @author Thomas Müller <thomas.mueller@tmit.eu>
*
* @license GNU AGPL version 3 or any later version
@@ -21,10 +19,11 @@
*
*/
style('core', ['styles', 'header']);
+
+/** @param $_ array */
?>
<span class="error error-wide">
<h2><strong><?php p($_['title']) ?></strong></h2>
- <p><?php p($_['message']) ?></p>
<br>
<h2><strong><?php p($l->t('Technical details')) ?></strong></h2>