From 7559c4316830b24c338096b96384d35877794125 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 30 Nov 2014 18:40:10 +0100 Subject: Reject empty mode parameters in ModeParser::Process() instead of relying on ModeHandlers to do it --- src/mode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mode.cpp') diff --git a/src/mode.cpp b/src/mode.cpp index 2a32dfac2..89ff37fa1 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -470,7 +470,7 @@ void ModeParser::Process(const std::vector& parameters, User *user, { parameter = parameters[param_at++]; /* Make sure the user isn't trying to slip in an invalid parameter */ - if ((parameter.find(':') == 0) || (parameter.rfind(' ') != std::string::npos)) + if ((parameter.empty()) || (parameter.find(':') == 0) || (parameter.rfind(' ') != std::string::npos)) continue; if (merge && targetchannel && targetchannel->IsModeSet(modechar) && !mh->IsListMode()) { -- cgit v1.2.3