mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed decodeCookie()
This commit is contained in:
parent
e6ea3d4edd
commit
fd2c9de227
11 changed files with 47 additions and 11 deletions
|
@ -1858,7 +1858,7 @@ function CreateMeshCentralServer(config, args) {
|
|||
|
||||
// Decode a cookie back into an object using a key using AES256-GCM or AES128-CBC/HMAC-SHA386. Return null if it's not a valid cookie. (key must be 32 bytes or more)
|
||||
obj.decodeCookie = function (cookie, key, timeout) {
|
||||
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) && (typeof r.once == 'string') && (r.once.length > 0)) {
|
||||
// This cookie must only be used once.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue