summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-03-19 23:44:14 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-03-23 08:45:36 +0000
commitf11283ac4b6b6051ea402a7b8a230985d4ff3dfb (patch)
tree25abea4c392b02f268687682db73b36b90a25aa6 /apps
parentf886e7c84837efbd992e6dbed13b4dfd3ec51e8e (diff)
downloadnextcloud-server-f11283ac4b6b6051ea402a7b8a230985d4ff3dfb.tar.gz
nextcloud-server-f11283ac4b6b6051ea402a7b8a230985d4ff3dfb.zip
fix dav browser error page not styled
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Files/BrowserErrorPagePlugin.php3
-rw-r--r--apps/dav/templates/exception.php6
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/dav/lib/Files/BrowserErrorPagePlugin.php b/apps/dav/lib/Files/BrowserErrorPagePlugin.php
index e1e64b3e6f4..3502acde974 100644
--- a/apps/dav/lib/Files/BrowserErrorPagePlugin.php
+++ b/apps/dav/lib/Files/BrowserErrorPagePlugin.php
@@ -25,6 +25,7 @@ namespace OCA\DAV\Files;
use OC\AppFramework\Http\Request;
use OC_Template;
+use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\IRequest;
use Sabre\DAV\Exception;
use Sabre\DAV\Server;
@@ -82,6 +83,8 @@ class BrowserErrorPagePlugin extends ServerPlugin {
$this->server->httpResponse->setStatus($httpCode);
$body = $this->generateBody();
$this->server->httpResponse->setBody($body);
+ $csp = new ContentSecurityPolicy();
+ $this->server->httpResponse->addHeader('Content-Security-Policy', $csp->buildPolicy());
$this->sendResponse();
}
diff --git a/apps/dav/templates/exception.php b/apps/dav/templates/exception.php
index 9c09cbca444..8f922e22a38 100644
--- a/apps/dav/templates/exception.php
+++ b/apps/dav/templates/exception.php
@@ -22,12 +22,12 @@ style('core', ['styles', 'header']);
/** @param $_ array */
?>
-<span class="error error-wide">
+<div class="body-login-container update">
<h2><?php p($_['title']) ?></h2>
<h3><strong><?php p($l->t('Technical details')) ?></strong></h3>
- <ul>
+ <ul class="infogroup">
<li><?php p($l->t('Remote Address: %s', $_['remoteAddr'])) ?></li>
<li><?php p($l->t('Request ID: %s', $_['requestID'])) ?></li>
</ul>
-</span>
+</div>