Fixed deprecated buffer() usage.
Ylian Saint-Hilaire committed
Jul 24, 2021 at 14:35 UTC
552520cdc09da775a11efbe87cf05b449267f8e4
2 files changed
+14
-2
meshuser.js
+1
-1
@@ -4197,7 +4197,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
4197
if ((twoStepLoginSupported == false) || (command.name == null)) break;
4198
4199
// Send the registration request
4200
- var registrationOptions = parent.webauthn.generateRegistrationChallenge("Anonymous Service", { id: Buffer(user._id, 'binary').toString('base64'), name: user._id, displayName: user._id.split('/')[2] });
4200
+ var registrationOptions = parent.webauthn.generateRegistrationChallenge("Anonymous Service", { id: Buffer.from(user._id, 'binary').toString('base64'), name: user._id, displayName: user._id.split('/')[2] });
4201
obj.webAuthnReqistrationRequest = { action: 'webauthn-startregister', keyname: command.name, request: registrationOptions };
4202
ws.send(JSON.stringify(obj.webAuthnReqistrationRequest));
4203
break;
package.json
+13
-1
@@ -36,6 +36,8 @@
36
"sample-config-advanced.json"
37
],
38
"dependencies": {
39
+ "archiver": "^4.0.2",
40
+ "archiver-zip-encrypted": "^1.0.10",
41
"body-parser": "^1.19.0",
42
"cbor": "~5.2.0",
43
"compression": "^1.7.4",
@@ -44,16 +46,26 @@
46
"express-handlebars": "^3.1.0",
47
"express-ws": "^4.0.0",
48
"html-minifier": "^4.0.0",
49
+ "image-size": "^1.0.0",
50
"ipcheck": "^0.1.0",
51
"jsdom": "^16.6.0",
52
+ "loadavg-windows": "^1.1.1",
53
"minify-js": "0.0.4",
54
"minimist": "^1.2.0",
55
+ "mongodb": "^4.0.1",
56
"multiparty": "^4.2.1",
57
"nedb": "^1.8.0",
58
"node-forge": "^0.10.0",
59
+ "node-rdpjs-2": "^0.3.5",
60
+ "node-windows": "^1.0.0-beta.5",
61
+ "otplib": "^10.2.3",
62
+ "saslprep": "^1.0.3",
63
+ "ssh2": "^1.1.0",
64
+ "web-push": "^3.4.5",
65
"ws": "^5.2.3",
66
"xmldom": "^0.5.0",
56
- "yauzl": "^2.10.0"
67
+ "yauzl": "^2.10.0",
68
+ "yubikeyotp": "^0.2.0"
69
},
70
"repository": {
71
"type": "git",