Fixed cookieipcheck set to none not handled correctly.

Ylian Saint-Hilaire committed May 16, 2022 at 16:32 UTC 26970b2f411a8acd467f97bd0b411c44b32f2bd7
1 file changed +1 -1
meshcentral.js
+1 -1
@@ -778,7 +778,7 @@ function CreateMeshCentralServer(config, args) {
778 if (typeof obj.args.tlsoffload == 'string') { obj.args.tlsoffload = obj.args.tlsoffload.split(' ').join('').split(','); }
779
780 // Check the "cookieIpCheck" value
781 - if (obj.args.cookieipcheck === false) { obj.args.cookieipcheck = 'none'; }
781 + if ((obj.args.cookieipcheck === false) || (obj.args.cookieipcheck == 'none')) { obj.args.cookieipcheck = 'none'; }
782 else if ((typeof obj.args.cookieipcheck != 'string') || (obj.args.cookieipcheck.toLowerCase() != 'strict')) { obj.args.cookieipcheck = 'lax'; }
783 else { obj.args.cookieipcheck = 'strict'; }
784