Fixed MeshCtrl.js when username or password is all numbers. #2499

This commit is contained in:
Ylian Saint-Hilaire 2021-04-15 12:19:03 -07:00
parent 927d1e246d
commit 9a71a2b83a

View File

@ -1018,7 +1018,7 @@ function serverConnect() {
if (args.loginuser != null) { username = args.loginuser; } if (args.loginuser != null) { username = args.loginuser; }
var token = ''; var token = '';
if (args.token != null) { token = ',' + Buffer.from('' + args.token).toString('base64'); } if (args.token != null) { token = ',' + Buffer.from('' + args.token).toString('base64'); }
options.headers = { 'x-meshauth': Buffer.from(username).toString('base64') + ',' + Buffer.from(args.loginpass).toString('base64') + token } options.headers = { 'x-meshauth': Buffer.from('' + username).toString('base64') + ',' + Buffer.from('' + args.loginpass).toString('base64') + token }
} }
// Cookie authentication // Cookie authentication