]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - netconn.c
fix rcon_password validation to refuse whitespace, and refuse empty passwords (as...
[xonotic/darkplaces.git] / netconn.c
index 74ba01ba951e988b9d822be4e33f53530c4a2e7d..9628a3802ac9eea9139991e991314564545f5ba5 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -1574,7 +1574,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                        if (i < (int)sizeof(password) - 1)
                                                password[i++] = *s;
                                password[i] = 0;
-                               if (!strcmp(rcon_password.string, password))
+                               if (password[0] > ' ' && !strcmp(rcon_password.string, password))
                                {
                                        // looks like a legitimate rcon command with the correct password
                                        Con_Printf("server received rcon command from %s:\n%s\n", host_client ? host_client->name : addressstring2, s);