Fix for server exception, #3884

This commit is contained in:
Ylian Saint-Hilaire 2022-04-15 00:36:05 -07:00
parent 430e2a4f0c
commit a306da2df8
1 changed files with 1 additions and 1 deletions

View File

@ -3103,7 +3103,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)
obj.decodeCookie = function (cookie, key, timeout) {
if (cookie == null) return null;
const 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) && (obj.args.cookieencoding == null) && (cookie.length != 64) && ((cookie == cookie.toLowerCase()) || (cookie == cookie.toUpperCase()))) {
obj.debug('cookie', 'Upper/Lowercase cookie, try "CookieEncoding":"hex" in settings section of config.json.');