]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix dav browser error page not styled
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Thu, 19 Mar 2020 22:44:14 +0000 (23:44 +0100)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Thu, 19 Mar 2020 22:44:14 +0000 (23:44 +0100)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/dav/lib/Files/BrowserErrorPagePlugin.php
apps/dav/templates/exception.php

index e1e64b3e6f49e8924221569e368f0bf5d835fd37..3502acde97420652a51023147b9828830cb7c652 100644 (file)
@@ -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();
        }
 
index 9c09cbca444bc220898f6a990b8d4bc3a22f6b48..8f922e22a38298c8ef82ce6300cac7341b28f683 100644 (file)
@@ -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>