mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-26 22:23:14 -05:00
2FA fixes.
This commit is contained in:
parent
d97aecab90
commit
6e1ba774aa
@ -621,11 +621,14 @@
|
|||||||
<Folder Include="typings\" />
|
<Folder Include="typings\" />
|
||||||
<Folder Include="typings\globals\" />
|
<Folder Include="typings\globals\" />
|
||||||
<Folder Include="typings\globals\ajv\" />
|
<Folder Include="typings\globals\ajv\" />
|
||||||
|
<Folder Include="typings\globals\axios\" />
|
||||||
<Folder Include="typings\globals\connect-redis\" />
|
<Folder Include="typings\globals\connect-redis\" />
|
||||||
<Folder Include="typings\globals\cookie-session\" />
|
<Folder Include="typings\globals\cookie-session\" />
|
||||||
<Folder Include="typings\globals\express-handlebars\" />
|
<Folder Include="typings\globals\express-handlebars\" />
|
||||||
<Folder Include="typings\globals\express-session\" />
|
<Folder Include="typings\globals\express-session\" />
|
||||||
|
<Folder Include="typings\globals\handlebars\" />
|
||||||
<Folder Include="typings\globals\jsbn\" />
|
<Folder Include="typings\globals\jsbn\" />
|
||||||
|
<Folder Include="typings\globals\moment\" />
|
||||||
<Folder Include="typings\globals\node-forge\" />
|
<Folder Include="typings\globals\node-forge\" />
|
||||||
<Folder Include="typings\globals\nodemailer\" />
|
<Folder Include="typings\globals\nodemailer\" />
|
||||||
<Folder Include="typings\globals\node\" />
|
<Folder Include="typings\globals\node\" />
|
||||||
@ -635,11 +638,14 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<TypeScriptCompile Include="typings\globals\ajv\index.d.ts" />
|
<TypeScriptCompile Include="typings\globals\ajv\index.d.ts" />
|
||||||
|
<TypeScriptCompile Include="typings\globals\axios\index.d.ts" />
|
||||||
<TypeScriptCompile Include="typings\globals\connect-redis\index.d.ts" />
|
<TypeScriptCompile Include="typings\globals\connect-redis\index.d.ts" />
|
||||||
<TypeScriptCompile Include="typings\globals\cookie-session\index.d.ts" />
|
<TypeScriptCompile Include="typings\globals\cookie-session\index.d.ts" />
|
||||||
<TypeScriptCompile Include="typings\globals\express-handlebars\index.d.ts" />
|
<TypeScriptCompile Include="typings\globals\express-handlebars\index.d.ts" />
|
||||||
<TypeScriptCompile Include="typings\globals\express-session\index.d.ts" />
|
<TypeScriptCompile Include="typings\globals\express-session\index.d.ts" />
|
||||||
|
<TypeScriptCompile Include="typings\globals\handlebars\index.d.ts" />
|
||||||
<TypeScriptCompile Include="typings\globals\jsbn\index.d.ts" />
|
<TypeScriptCompile Include="typings\globals\jsbn\index.d.ts" />
|
||||||
|
<TypeScriptCompile Include="typings\globals\moment\index.d.ts" />
|
||||||
<TypeScriptCompile Include="typings\globals\node-forge\index.d.ts" />
|
<TypeScriptCompile Include="typings\globals\node-forge\index.d.ts" />
|
||||||
<TypeScriptCompile Include="typings\globals\nodemailer\index.d.ts" />
|
<TypeScriptCompile Include="typings\globals\nodemailer\index.d.ts" />
|
||||||
<TypeScriptCompile Include="typings\globals\node\index.d.ts" />
|
<TypeScriptCompile Include="typings\globals\node\index.d.ts" />
|
||||||
|
@ -2695,7 +2695,7 @@ function CreateMeshCentralServer(config, args) {
|
|||||||
|
|
||||||
// Decode a cookie back into an object using a key using AES256-GCM or AES128-CBC/HMAC-SHA384. Return null if it's not a valid cookie. (key must be 32 bytes or more)
|
// Decode a cookie back into an object using a key using AES256-GCM or AES128-CBC/HMAC-SHA384. Return null if it's not a valid cookie. (key must be 32 bytes or more)
|
||||||
obj.decodeCookie = function (cookie, key, timeout) {
|
obj.decodeCookie = function (cookie, key, timeout) {
|
||||||
if ((cookie == null) || (key == null)) return null;
|
if (cookie == null) return null;
|
||||||
var r = obj.decodeCookieAESGCM(cookie, key, timeout);
|
var r = obj.decodeCookieAESGCM(cookie, key, timeout);
|
||||||
if (r == null) { r = obj.decodeCookieAESSHA(cookie, key, timeout); }
|
if (r == null) { r = obj.decodeCookieAESSHA(cookie, key, timeout); }
|
||||||
if ((r == null) && (obj.args.cookieencoding == null) && (cookie.length != 64) && ((cookie == cookie.toLowerCase()) || (cookie == cookie.toUpperCase()))) {
|
if ((r == null) && (obj.args.cookieencoding == null) && (cookie.length != 64) && ((cookie == cookie.toLowerCase()) || (cookie == cookie.toUpperCase()))) {
|
||||||
@ -3126,7 +3126,10 @@ function mainStart() {
|
|||||||
if (config.settings.desktopmultiplex === true) { modules.push('image-size'); }
|
if (config.settings.desktopmultiplex === true) { modules.push('image-size'); }
|
||||||
|
|
||||||
// SMS support
|
// SMS support
|
||||||
if ((config.sms != null) && (config.sms.provider == 'twilio')) { modules.push('twilio'); }
|
if ((config.sms != null) && (config.sms.provider == 'twilio')) {
|
||||||
|
const NodeJSVer = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
|
||||||
|
if (NodeJSVer < 8) { console.log("SMS Twilio support requires Node v8 or above, current version is " + process.version + "."); } else { modules.push('twilio'); }
|
||||||
|
}
|
||||||
if ((config.sms != null) && (config.sms.provider == 'plivo')) {
|
if ((config.sms != null) && (config.sms.provider == 'plivo')) {
|
||||||
const NodeJSVer = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
|
const NodeJSVer = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
|
||||||
if (NodeJSVer < 8) { console.log("SMS Plivo support requires Node v8 or above, current version is " + process.version + "."); } else { modules.push('plivo'); }
|
if (NodeJSVer < 8) { console.log("SMS Plivo support requires Node v8 or above, current version is " + process.version + "."); } else { modules.push('plivo'); }
|
||||||
|
10
meshuser.js
10
meshuser.js
@ -2700,10 +2700,12 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||||||
if (command.resetNextLogin === true) { chguser.passchange = -1; } else { chguser.passchange = Math.floor(Date.now() / 1000); }
|
if (command.resetNextLogin === true) { chguser.passchange = -1; } else { chguser.passchange = Math.floor(Date.now() / 1000); }
|
||||||
delete chguser.passtype; // Remove the password type if one was present.
|
delete chguser.passtype; // Remove the password type if one was present.
|
||||||
if (command.removeMultiFactor == true) {
|
if (command.removeMultiFactor == true) {
|
||||||
if (chguser.otpekey) { delete chguser.otpekey; }
|
if (chguser.otpekey != null) { delete chguser.otpekey; }
|
||||||
if (chguser.otpsecret) { delete chguser.otpsecret; }
|
if (chguser.otpsecret != null) { delete chguser.otpsecret; }
|
||||||
if (chguser.otphkeys) { delete chguser.otphkeys; }
|
if (chguser.otphkeys != null) { delete chguser.otphkeys; }
|
||||||
if (chguser.otpkeys) { delete chguser.otpkeys; }
|
if (chguser.otpkeys != null) { delete chguser.otpkeys; }
|
||||||
|
if ((chguser.otpekey != null) && (((typeof domain.passwordrequirements != 'object') || (domain.passwordrequirements.email2factor != false)) && (domain.mailserver != null))) { delete chguser.otpekey; }
|
||||||
|
if ((chguser.phone != null) && (parent.parent.smsserver != null)) { delete chguser.phone; }
|
||||||
}
|
}
|
||||||
db.SetUser(chguser);
|
db.SetUser(chguser);
|
||||||
|
|
||||||
|
14
package.json
14
package.json
@ -36,6 +36,9 @@
|
|||||||
"sample-config-advanced.json"
|
"sample-config-advanced.json"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@sendgrid/mail": "^7.4.2",
|
||||||
|
"archiver": "^4.0.2",
|
||||||
|
"archiver-zip-encrypted": "^1.0.8",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"cbor": "~5.2.0",
|
"cbor": "~5.2.0",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
@ -44,14 +47,23 @@
|
|||||||
"express": "^4.17.0",
|
"express": "^4.17.0",
|
||||||
"express-handlebars": "^3.1.0",
|
"express-handlebars": "^3.1.0",
|
||||||
"express-ws": "^4.0.0",
|
"express-ws": "^4.0.0",
|
||||||
|
"image-size": "^0.9.3",
|
||||||
"ipcheck": "^0.1.0",
|
"ipcheck": "^0.1.0",
|
||||||
"minimist": "^1.2.0",
|
"minimist": "^1.2.0",
|
||||||
|
"mongodb": "^3.6.4",
|
||||||
"multiparty": "^4.2.1",
|
"multiparty": "^4.2.1",
|
||||||
"nedb": "^1.8.0",
|
"nedb": "^1.8.0",
|
||||||
"node-forge": "^0.10.0",
|
"node-forge": "^0.10.0",
|
||||||
|
"node-rdpjs-2": "^0.3.5",
|
||||||
|
"node-windows": "^0.1.14",
|
||||||
|
"otplib": "^10.2.3",
|
||||||
|
"saslprep": "^1.0.3",
|
||||||
|
"twilio": "^3.56.0",
|
||||||
|
"web-push": "^3.4.4",
|
||||||
"ws": "^6.2.1",
|
"ws": "^6.2.1",
|
||||||
"xmldom": "^0.1.27",
|
"xmldom": "^0.1.27",
|
||||||
"yauzl": "^2.10.0"
|
"yauzl": "^2.10.0",
|
||||||
|
"yubikeyotp": "^0.2.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
1753
public/commander.htm
1753
public/commander.htm
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user