From 9b3024a87428ff3c61ee4aa7c17104e63dd75430 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 20 Oct 2023 19:12:42 +0200 Subject: [PATCH] Don't query JWT token if we connect to localhost Localhost in many cases implies usage of listen server; these don't require auth on loopback connections. --- src/engine/client/clientstate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/client/clientstate.cpp b/src/engine/client/clientstate.cpp index d019e23a..6fe1ee9a 100644 --- a/src/engine/client/clientstate.cpp +++ b/src/engine/client/clientstate.cpp @@ -218,7 +218,9 @@ bool CClientState::Authenticate(connectparams_t* connectParams) const void CClientState::VConnect(CClientState* thisptr, connectparams_t* connectParams) { - thisptr->Authenticate(connectParams); + if (strncmp(connectParams->netAdr, "localhost", 9) != NULL) + thisptr->Authenticate(connectParams); + CClientState__Connect(thisptr, connectParams); }