1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 15:06:38 +02:00

Fix information leak in cs_updown

This commit is contained in:
Adam
2014-06-09 16:36:49 -04:00
parent 6526d2d8b3
commit 56c6ef4449
+12
View File
@@ -81,6 +81,7 @@ class CommandCSUp : public Command
}
User *u = User::Find(nick, true);
User *srcu = source.GetUser();
bool override = false;
if (u == NULL)
@@ -88,6 +89,11 @@ class CommandCSUp : public Command
source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
return;
}
else if (srcu && !srcu->FindChannel(c))
{
source.Reply(_("You must be in \002%s\002 to use this command."), c->name.c_str());
return;
}
else if (!u->FindChannel(c))
{
source.Reply(NICK_X_NOT_ON_CHAN, nick.c_str(), channel.c_str());
@@ -173,6 +179,7 @@ class CommandCSDown : public Command
}
User *u = User::Find(nick, true);
User *srcu = source.GetUser();
bool override = false;
if (u == NULL)
@@ -180,6 +187,11 @@ class CommandCSDown : public Command
source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
return;
}
else if (srcu && !srcu->FindChannel(c))
{
source.Reply(_("You must be in \002%s\002 to use this command."), c->name.c_str());
return;
}
else if (!u->FindChannel(c))
{
source.Reply(NICK_X_NOT_ON_CHAN, nick.c_str(), channel.c_str());