Browse Source

Enable host-user matching for bot links

Bryan Drewery 13 years ago
parent
commit
37d3cca283
2 changed files with 6 additions and 3 deletions
  1. 3 0
      doc/UPDATES
  2. 3 3
      src/dcc.c

+ 3 - 0
doc/UPDATES

@@ -1,3 +1,6 @@
+* Bots linking in must now have a matching host on their user to succeed linking.
+  This was always requiring a valid host, but was not restricted to that bot.
+
 1.4.2 - http://wraith.botpack.net/milestone/1.4.2
 1.4.2 - http://wraith.botpack.net/milestone/1.4.2
   * Prevent crashing on startup if openssl can not be loaded
   * Prevent crashing on startup if openssl can not be loaded
   * Rename option -c to -m for 'manual' edit, and redirect -c to -C
   * Rename option -c to -m for 'manual' edit, and redirect -c to -C

+ 3 - 3
src/dcc.c

@@ -1814,9 +1814,9 @@ dcc_telnet_id(int idx, char *buf, int atr)
     if (!u)
     if (!u)
       ok = 0;
       ok = 0;
 
 
-//    // Restrict connect to matching the user who they claim to be
-//    if (u && strcasecmp(nick, u->handle))
-//      ok = 0;
+    // Restrict connect to matching the user who they claim to be
+    if (u && strcasecmp(nick, u->handle))
+      ok = 0;
 
 
     if (!ok) {
     if (!ok) {
       putlog(LOG_BOTS, "*", "Denied link to '%s': Host not recognized: %s", nick, dcc[idx].host);
       putlog(LOG_BOTS, "*", "Denied link to '%s': Host not recognized: %s", nick, dcc[idx].host);