Fixed TouchID on mobile, 404 page when using loginkey.
Ylian Saint-Hilaire committed
Feb 27, 2020 at 12:55 UTC
df79a44e95082a95c97d7250d80b00bd9e408f67
3 files changed
+4
-2
package.json
+1
-1
@@ -1,6 +1,6 @@
1
{
2
"name": "meshcentral",
3
- "version": "0.4.9-j",
3
+ "version": "0.4.9-l",
4
"keywords": [
5
"Remote Management",
6
"Intel AMT",
views/login-mobile.handlebars
+1
-1
@@ -338,7 +338,7 @@
338
publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout }
339
for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) {
340
publicKeyCredentialRequestOptions.allowCredentials.push(
341
- { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), function (c) { return c.charCodeAt(0) }), type: 'public-key', transports: ['usb', 'ble', 'nfc'], }
341
+ { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), function (c) { return c.charCodeAt(0) }), type: 'public-key', transports: ['usb', 'ble', 'nfc', 'internal'], }
342
);
343
}
344
webserver.js
+2
@@ -3650,6 +3650,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
3650
obj.app.use(function (req, res, next) {
3651
parent.debug('web', '404 Error ' + req.url);
3652
var domain = getDomain(req);
3653
+ if ((domain == null) || (domain.auth == 'sspi')) { res.sendStatus(404); return; }
3654
+ if ((domain.loginkey != null) && (domain.loginkey.indexOf(req.query.key) == -1)) { res.sendStatus(404); return; } // Check 3FA URL key
3655
res.status(404).render(getRenderPage('error404', req), getRenderArgs({}, domain));
3656
});
3657
}