Merge pull request #1344 from nextcloud/stable9-throw-exceptions-not-printable

[stable9] Don't print exception message in HTML
This commit is contained in:
Morris Jobke 2016-09-09 14:57:18 +02:00 committed by GitHub
commit a0d63d4b13
2 changed files with 3 additions and 5 deletions

View File

@ -31,7 +31,6 @@ use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin; use Sabre\DAV\ServerPlugin;
class BrowserErrorPagePlugin extends ServerPlugin { class BrowserErrorPagePlugin extends ServerPlugin {
/** @var Server */ /** @var Server */
private $server; private $server;
@ -88,8 +87,7 @@ class BrowserErrorPagePlugin extends ServerPlugin {
/** /**
* @codeCoverageIgnore * @codeCoverageIgnore
* @param \Exception $ex * @param \Exception $exception
* @param int $httpCode
* @return bool|string * @return bool|string
*/ */
public function generateBody(\Exception $exception) { public function generateBody(\Exception $exception) {
@ -109,10 +107,11 @@ class BrowserErrorPagePlugin extends ServerPlugin {
return $content->fetchPage(); return $content->fetchPage();
} }
/* /**
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function sendResponse() { public function sendResponse() {
$this->server->sapi->sendResponse($this->server->httpResponse); $this->server->sapi->sendResponse($this->server->httpResponse);
exit();
} }
} }

View File

@ -6,7 +6,6 @@ style('core', ['styles', 'header']);
?> ?>
<span class="error error-wide"> <span class="error error-wide">
<h2><strong><?php p($_['title']) ?></strong></h2> <h2><strong><?php p($_['title']) ?></strong></h2>
<p><?php p($_['message']) ?></p>
<br> <br>
<h2><strong><?php p($l->t('Technical details')) ?></strong></h2> <h2><strong><?php p($l->t('Technical details')) ?></strong></h2>