Skip to content

Commit 70231dc

Browse files
authored
Merge pull request #1343 from nextcloud/stable10-throw-exceptions-not-printable
[stable10] Don't print exception message in HTML
2 parents 3270da0 + 7350e13 commit 70231dc

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

apps/dav/lib/Files/BrowserErrorPagePlugin.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
use Sabre\DAV\ServerPlugin;
3232

3333
class BrowserErrorPagePlugin extends ServerPlugin {
34-
3534
/** @var Server */
3635
private $server;
3736

@@ -88,8 +87,7 @@ public function logException(\Exception $ex) {
8887

8988
/**
9089
* @codeCoverageIgnore
91-
* @param \Exception $ex
92-
* @param int $httpCode
90+
* @param \Exception $exception
9391
* @return bool|string
9492
*/
9593
public function generateBody(\Exception $exception) {
@@ -109,10 +107,11 @@ public function generateBody(\Exception $exception) {
109107
return $content->fetchPage();
110108
}
111109

112-
/*
110+
/**
113111
* @codeCoverageIgnore
114112
*/
115113
public function sendResponse() {
116114
$this->server->sapi->sendResponse($this->server->httpResponse);
115+
exit();
117116
}
118117
}

apps/dav/templates/exception.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
?>
77
<span class="error error-wide">
88
<h2><strong><?php p($_['title']) ?></strong></h2>
9-
<p><?php p($_['message']) ?></p>
109
<br>
1110

1211
<h2><strong><?php p($l->t('Technical details')) ?></strong></h2>

0 commit comments

Comments
 (0)