From 8d622ff6f8d428fd848c473566240402b748a487 Mon Sep 17 00:00:00 2001
From: Monster Iestyn <iestynjealous@ntlworld.com>
Date: Sun, 5 Aug 2018 20:17:30 +0100
Subject: [PATCH] Quick fix for LJ's password fix: don't check if password is
 set until we've confirmed that the receiving player is the server!

---
 src/d_netcmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/d_netcmd.c b/src/d_netcmd.c
index 727d5eff47..bf26ca61a1 100644
--- a/src/d_netcmd.c
+++ b/src/d_netcmd.c
@@ -2730,15 +2730,15 @@ static void Got_Login(UINT8 **cp, INT32 playernum)
 
 	READMEM(*cp, sentmd5, 16);
 
+	if (client)
+		return;
+
 	if (!adminpasswordset)
 	{
 		CONS_Printf(M_GetText("Password from %s failed (no password set).\n"), player_names[playernum]);
 		return;
 	}
 
-	if (client)
-		return;
-
 	// Do the final pass to compare with the sent md5
 	D_MD5PasswordPass(adminpassmd5, 16, va("PNUM%02d", playernum), &finalmd5);
 
-- 
GitLab