Committer  : decampos
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2006-02-17 10:35:09 UTC

Modified files:
  Tag: u2_10_12_branch
     ChangeLog ircd/m_pong.c ircd/s_auth.c

Log message:

Author: Alex Badea <[EMAIL PROTECTED]>
Log message:

Fix mr_pong failing for cookies larger than 0x7fffffff.
Fix auth_set_username always returning "invalid username".

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.72 ircu2.10/ChangeLog:1.710.2.73
--- ircu2.10/ChangeLog:1.710.2.72       Wed Feb 15 20:04:24 2006
+++ ircu2.10/ChangeLog  Fri Feb 17 02:34:59 2006
@@ -1,3 +1,12 @@
+2006-02-17  Alex Badea <[EMAIL PROTECTED]>
+
+       * ircd/s_auth.c (auth_set_username): Check if the last
+       character of the username is alphanumeric, instead of the
+       '\0' terminator.
+       
+       * ircd/m_pong.c (mr_pong): Parse cookie with strtoul(),
+       since atol() causes signedness problems.
+
 2006-02-15  Michael Poole <[EMAIL PROTECTED]>
 
        * include/res.h (NXDOMAIN): Define.
Index: ircu2.10/ircd/m_pong.c
diff -u ircu2.10/ircd/m_pong.c:1.16.2.1 ircu2.10/ircd/m_pong.c:1.16.2.2
--- ircu2.10/ircd/m_pong.c:1.16.2.1     Wed Feb 15 19:49:54 2006
+++ ircu2.10/ircd/m_pong.c      Fri Feb 17 02:34:59 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_pong.c,v 1.16.2.1 2006/02/16 03:49:54 entrope Exp $
+ * $Id: m_pong.c,v 1.16.2.2 2006/02/17 10:34:59 decampos Exp $
  */
 
 /*
@@ -164,7 +164,7 @@
 
   ClrFlag(cptr, FLAG_PINGSENT);
   cli_lasttime(cptr) = CurrentTime;
-  return (parc > 1) ? auth_set_pong(cli_auth(sptr), atol(parv[parc - 1])) : 0;
+  return (parc > 1) ? auth_set_pong(cli_auth(sptr), strtoul(parv[parc - 1], 
NULL, 10)) : 0;
 }
 
 /*
Index: ircu2.10/ircd/s_auth.c
diff -u ircu2.10/ircd/s_auth.c:1.37.2.1 ircu2.10/ircd/s_auth.c:1.37.2.2
--- ircu2.10/ircd/s_auth.c:1.37.2.1     Wed Feb 15 19:49:54 2006
+++ ircu2.10/ircd/s_auth.c      Fri Feb 17 02:34:59 2006
@@ -31,7 +31,7 @@
  */
 /** @file
  * @brief Implementation of DNS and ident lookups.
- * @version $Id: s_auth.c,v 1.37.2.1 2006/02/16 03:49:54 entrope Exp $
+ * @version $Id: s_auth.c,v 1.37.2.2 2006/02/17 10:34:59 decampos Exp $
  */
 #include "config.h"
 
@@ -322,7 +322,7 @@
     if (!lower && !upper)
       goto badid;
     /* Final character must not be punctuation. */
-    if (!IsAlnum(ch))
+    if (!IsAlnum(last))
       goto badid;
   }
 
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to