diff --git a/views/error404-mobile.handlebars b/views/error404-mobile.handlebars index def7cd34..b2a19c26 100644 --- a/views/error404-mobile.handlebars +++ b/views/error404-mobile.handlebars @@ -9,7 +9,11 @@ {{{title}}} - - +
-
-
- {{{title}}} +
+
+ {{{title}}}
-
- {{{title2}}} +
+ {{{title2}}}
-
-
-
404
-
This page does not exist
- +
+
+
404
+
This page does not exist
+
- diff --git a/views/error404.handlebars b/views/error404.handlebars index 1c742328..2df7c2db 100644 --- a/views/error404.handlebars +++ b/views/error404.handlebars @@ -10,53 +10,128 @@ {{{title}}} + - +
-
-
{{{titlehtml}}}
-
- {{{title1}}} +
+
{{{titlehtml}}}
+
+ {{{title1}}}
-
- {{{title2}}} +
+ {{{title2}}}
-
+
-
-
+
+
♦ -
-
-
404
-
This page does not exist
- +
+
404
+
This page does not exist
+
- diff --git a/views/error4042.handlebars b/views/error4042.handlebars index 741ca76b..ab9deb92 100644 --- a/views/error4042.handlebars +++ b/views/error4042.handlebars @@ -10,7 +10,7 @@ {{{title1}}} - Download - - - + +
diff --git a/views/login2.handlebars b/views/login2.handlebars index 6e23ceb9..97a93d55 100644 --- a/views/login2.handlebars +++ b/views/login2.handlebars @@ -19,15 +19,37 @@ background: linear-gradient(to bottom right, #369, #036); } - #flink a:link { color: #c8c8c8; } - #flink a:visited { color: #c8c8c8; } - #flink a:hover { color: #c8c8c8; } - #flink a:active { color: #c8c8c8; } + #flink a:link { + color: #c8c8c8; + } - #welcomeText a:link { color: #FFF; } - #welcomeText a:visited { color: #FFF; } - #welcomeText a:hover { color: #FFF; } - #welcomeText a:active { color: #FFF; } + #flink a:visited { + color: #c8c8c8; + } + + #flink a:hover { + color: #c8c8c8; + } + + #flink a:active { + color: #c8c8c8; + } + + #welcomeText a:link { + color: #FFF; + } + + #welcomeText a:visited { + color: #FFF; + } + + #welcomeText a:hover { + color: #FFF; + } + + #welcomeText a:active { + color: #FFF; + } diff --git a/webserver.js b/webserver.js index b2833312..4f64028b 100644 --- a/webserver.js +++ b/webserver.js @@ -6359,8 +6359,10 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF parent.debug('web', '404 Error ' + req.url); var domain = getDomain(req); if ((domain == null) || (domain.auth == 'sspi')) { res.sendStatus(404); return; } - if ((domain.loginkey != null) && (domain.loginkey.indexOf(req.query.key) == -1)) { res.sendStatus(404); return; } // Check 3FA URL key - res.status(404).render(getRenderPage((domain.sitestyle == 2) ? 'error4042' : 'error404', req, domain), getRenderArgs({}, req, domain)); + if ((domain.loginkey != null) && (domain.loginkey.indexOf(req.query.key) == -1)) { res.sendStatus(404); return; } // Check 3FA URL + const cspNonce = obj.crypto.randomBytes(15).toString('base64'); + res.set({ 'Content-Security-Policy': "default-src 'none'; script-src 'self' 'nonce-" + cspNonce + "'; img-src 'self'; style-src 'self' 'nonce-" + cspNonce + "';" }); + res.status(404).render(getRenderPage((domain.sitestyle == 2) ? 'error4042' : 'error404', req, domain), getRenderArgs({ cspNonce: cspNonce }, req, domain)); }); }
-
404
-
This page does not exist
- +
404
+
This page does not exist
+
- - +
{{{footer}}}
+
{{{rootCertLink}}} Terms & Privacy