summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php32
1 files changed, 19 insertions, 13 deletions
diff --git a/lib/base.php b/lib/base.php
index f848a4fff54..8b271010b10 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -281,6 +281,7 @@ class OC {
// render error page
$template = new OC_Template('', 'update.user', 'guest');
OC_Util::addScript('maintenance-check');
+ OC_Util::addStyle('update');
$template->printPage();
die();
}
@@ -354,6 +355,8 @@ class OC {
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 120');
+ \OCP\Util::addStyle('update');
+
// render error page
$template = new OC_Template('', 'update.use-cli', 'guest');
$template->assign('productName', 'nextcloud'); // for now
@@ -666,11 +669,6 @@ class OC {
OC\Log\ErrorHandler::register($debug);
}
- // register the stream wrappers
- stream_wrapper_register('static', 'OC\Files\Stream\StaticStream');
- stream_wrapper_register('close', 'OC\Files\Stream\Close');
- stream_wrapper_register('quota', 'OC\Files\Stream\Quota');
-
\OC::$server->getEventLogger()->start('init_session', 'Initialize session');
OC_App::loadApps(array('session'));
if (!self::$CLI) {
@@ -787,23 +785,31 @@ class OC {
&& !\OC::$server->getTrustedDomainHelper()->isTrustedDomain($host)
&& self::$server->getConfig()->getSystemValue('installed', false)
) {
- header('HTTP/1.1 400 Bad Request');
- header('Status: 400 Bad Request');
+ // Allow access to CSS resources
+ $isScssRequest = false;
+ if(strpos($request->getPathInfo(), '/css/') === 0) {
+ $isScssRequest = true;
+ }
- \OC::$server->getLogger()->warning(
+ if (!$isScssRequest) {
+ header('HTTP/1.1 400 Bad Request');
+ header('Status: 400 Bad Request');
+
+ \OC::$server->getLogger()->warning(
'Trusted domain error. "{remoteAddress}" tried to access using "{host}" as host.',
[
'app' => 'core',
'remoteAddress' => $request->getRemoteAddress(),
'host' => $host,
]
- );
+ );
- $tmpl = new OCP\Template('core', 'untrustedDomain', 'guest');
- $tmpl->assign('domain', $host);
- $tmpl->printPage();
+ $tmpl = new OCP\Template('core', 'untrustedDomain', 'guest');
+ $tmpl->assign('domain', $host);
+ $tmpl->printPage();
- exit();
+ exit();
+ }
}
\OC::$server->getEventLogger()->end('boot');
}