[eggheads-patches] PATCH: bug83-telnetuser.diff

Jeff Fisher guppy at broken.eggheads.org
Thu Oct 5 14:30:25 CST 2000


Fixed bug 83 by putting a - infront of the telnet!*@* hostmask, since no
nicks can start with -, no name can use -telnet as a nick on irc to
exploit any possible security bugs.

Jeff

-------------- next part --------------
diff -bur eggdrop-devel/doc/UPDATES1.5 fixed/doc/UPDATES1.5
--- eggdrop-devel/doc/UPDATES1.5	Mon Oct  2 16:35:42 2000
+++ fixed/doc/UPDATES1.5	Thu Oct  5 14:32:34 2000
@@ -5,6 +5,9 @@
 
 1.5.5
 Foundby   Fixedby   What....
+labtec    guppy     put a '-' infront of the telnet!*@* host which is added
+                      automatically to user records sometimes. No nicknames
+                      can start with '-' (RFC1459 compliant).
 Abraham/  Fabian    Small typo in ismember() (added during cleanup) caused
 DennisMV              channel functions to freak out. Sigh.
           Cybah     flush_mode() cleanups. -{b,e,I} now sent before +{b,e,I}.
diff -bur eggdrop-devel/src/dcc.c fixed/src/dcc.c
--- eggdrop-devel/src/dcc.c	Mon Sep 18 14:04:57 2000
+++ fixed/src/dcc.c	Thu Oct  5 14:29:04 2000
@@ -1591,7 +1591,7 @@
     dprintf(idx, "Sorry, can't use my name for a nick.\n");
   } else {
     if (make_userfile)
-      userlist = adduser(userlist, buf, "telnet!*@*", "-",
+      userlist = adduser(userlist, buf, "-telnet!*@*", "-",
 			 sanity_check(default_flags | USER_PARTY |
 				      USER_MASTER | USER_OWNER));
     else {
@@ -1602,12 +1602,12 @@
 	p++;
 	r = strchr(p, '.');
 	if (!r)
-	  simple_sprintf(work, "telnet!%s@%s", dcc[idx].host, p);
+	  simple_sprintf(work, "-telnet!%s@%s", dcc[idx].host, p);
 	else
-	  simple_sprintf(work, "telnet!%s@*%s", dcc[idx].host, r);
+	  simple_sprintf(work, "-telnet!%s@*%s", dcc[idx].host, r);
 	*q = '@';
       } else
-	simple_sprintf(work, "telnet!*@*%s", dcc[idx].host);
+	simple_sprintf(work, "-telnet!*@*%s", dcc[idx].host);
       userlist = adduser(userlist, buf, work, "-",
 			 sanity_check(USER_PARTY | default_flags));
     }
diff -bur eggdrop-devel/src/mod/irc.mod/msgcmds.c fixed/src/mod/irc.mod/msgcmds.c
--- eggdrop-devel/src/mod/irc.mod/msgcmds.c	Mon Sep 18 14:04:58 2000
+++ fixed/src/mod/irc.mod/msgcmds.c	Thu Oct  5 14:29:32 2000
@@ -74,7 +74,7 @@
       userlist = adduser(userlist, nick, host, "-",
 		 sanity_check(default_flags | USER_MASTER | USER_OWNER));
       set_user(&USERENTRY_HOSTS, get_user_by_handle(userlist, nick),
-	       "telnet!*@*");
+	       "-telnet!*@*");
     } else
       userlist = adduser(userlist, nick, host, "-",
 			 sanity_check(default_flags));


More information about the Patches mailing list