From 3cf993500544c2157992650da2487bfa89be405d Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Fri, 2 Apr 2010 10:39:15 -0500 Subject: Use FindNickOnly in a few commands to prevent enumerating users via UID walking --- src/commands/cmd_invite.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/commands/cmd_invite.cpp') diff --git a/src/commands/cmd_invite.cpp b/src/commands/cmd_invite.cpp index 8b2fcfa93..438aa37d0 100644 --- a/src/commands/cmd_invite.cpp +++ b/src/commands/cmd_invite.cpp @@ -41,7 +41,12 @@ CmdResult CommandInvite::Handle (const std::vector& parameters, Use if (parameters.size() == 2 || parameters.size() == 3) { - User* u = ServerInstance->FindNick(parameters[0]); + User* u; + if (IS_LOCAL(user)) + u = ServerInstance->FindNickOnly(parameters[0]); + else + u = ServerInstance->FindNick(parameters[0]); + Channel* c = ServerInstance->FindChan(parameters[1]); time_t timeout = 0; if (parameters.size() == 3) -- cgit v1.3.1-10-gc9f91