]> jfr.im git - irc/quakenet/newserv.git/commitdiff
NOPERSERV: fix existence of command name information disclosure by doing /msg N help...
authorChris Porter <redacted>
Sat, 26 Jun 2010 01:05:38 +0000 (01:05 +0000)
committerChris Porter <redacted>
Sat, 26 Jun 2010 01:05:38 +0000 (01:05 +0000)
noperserv/noperserv_hooks.c

index 1a09a1209a2740d0e1d965d752649f6d9b1297e1..3df5e8739c1a57a0f7226f4db160cfd95add499c 100644 (file)
@@ -452,13 +452,8 @@ int noperserv_help(void *sender, int cargc, char **cargv) {
     return CMD_USAGE;
 
   cmd = findcommandintree(controlcmds, cargv[0], 1);
-  if(!cmd) {
-    controlreply(np, "Unknown command.");
-    return CMD_ERROR;
-  }
-  
-  if(!noperserv_policy_command_permitted(cmd->level, np)) {
-    controlreply(np, "Access denied.");
+  if(!cmd || !noperserv_policy_command_permitted(cmd->level, np)) {
+    controlreply(np, "Unknown command or access denied.");
     return CMD_ERROR;
   }