From c4890aa8730f5a864a65fece927896c5c7d88810 Mon Sep 17 00:00:00 2001 From: Andrea Burattin Date: Tue, 3 Dec 2024 15:17:55 +0100 Subject: [PATCH] Properly handling faulty logins Invalid logins are not really caught unless the type of the session is is verified to be also a string in the first place --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3d53426..cbbd6df 100644 --- a/index.js +++ b/index.js @@ -94,7 +94,7 @@ const Client = (function () { throw new Error("Error creating session") } - if (this.sessionId == DEFAULT_SESSION_ID) + if (this.sessionId == DEFAULT_SESSION_ID || typeof this.sessionId !== "string") throw new Error("Invalid session") }