From 7bb18499688bfe6dbec5d56580d79533de8feb27 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sun, 22 Jan 2017 08:01:08 -0500 Subject: [PATCH] Sanitize servercfgfile and lservercfgfile values with amx_cvar (bug 6578). --- plugins/admincmd.sma | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/admincmd.sma b/plugins/admincmd.sma index 7f780d7d..8613589f 100755 --- a/plugins/admincmd.sma +++ b/plugins/admincmd.sma @@ -763,6 +763,15 @@ public cmdCvar(id, level, cid) console_print(id, "[AMXX] %L", id, "CVAR_IS", arg, arg2) return PLUGIN_HANDLED } + + if (equali(arg, "servercfgfile") || equali(arg, "lservercfgfile")) + { + new pos = contain(arg2, ";") + if (pos != -1) + { + arg2[pos] = '^0' + } + } new authid[32], name[MAX_NAME_LENGTH]