]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
turn off clientcommand whitelisting
authorRudolf Polzer <divverent@alientrap.org>
Sat, 7 May 2011 19:13:38 +0000 (21:13 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 7 May 2011 19:14:19 +0000 (21:14 +0200)
whitelisting breaks FTEQW; instead, we now lowercase the command to get rid of possibly sAY exploits

qcsrc/server/clientcommands.qc

index 922b846be375b5a445402f042a37bedff563941f..40e0fcd469723d9bcae56b594a7cb8b3c6ca863f 100644 (file)
@@ -129,7 +129,7 @@ void SV_ParseClientCommand(string s) {
 
        tokens = tokenize_console(s);
 
-       cmd = argv(0);
+       cmd = strtolower(argv(0));
        if(cmd != "reportcvar")
        if(cmd != "sentcvar")
        if(cmd != "pause")
@@ -362,6 +362,7 @@ void SV_ParseClientCommand(string s) {
                sprint(self, cvar_purechanges);
        } else if(CheatCommand(tokens)) {
        } else {
+#if 0
                //if(ctf_clientcommand())
                //      return;
                // grep for Cmd_AddCommand_WithClientCommand to find them all
@@ -387,6 +388,7 @@ void SV_ParseClientCommand(string s) {
                        print("WARNING: Invalid clientcommand by ", self.netname, ": ", s, "\n");
                        return;
                }
+#endif
 
                if(self.jointime > 0 && time > self.jointime + 10 && time > self.nickspamtime) // allow any changes in the first 10 seconds since joining
                if(cmd == "name" || cmd == "playermodel") // TODO also playerskin and color?