mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-26 07:57:56 +03:00
Fixed loginkey issue in meshctrl.js, #3956
This commit is contained in:
parent
070a70650f
commit
d5cf9dba33
@ -1126,10 +1126,10 @@ function serverConnect() {
|
||||
// Cookie authentication
|
||||
var ckey = null, loginCookie = null;
|
||||
if (args.loginkey != null) {
|
||||
// User key passed in a argument hex
|
||||
// User key passed in as argument hex
|
||||
if (args.loginkey.length != 160) { loginCookie = args.loginkey; }
|
||||
ckey = Buffer.from(args.loginkey, 'hex');
|
||||
if (ckey != 80) { ckey = null; loginCookie = args.loginkey; }
|
||||
if (ckey.length != 80) { ckey = null; loginCookie = args.loginkey; }
|
||||
} else if (args.loginkeyfile != null) {
|
||||
// Load key from hex file
|
||||
var fs = require('fs');
|
||||
|
Loading…
Reference in New Issue
Block a user