CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_11_02
Commit time: 2002-10-06 09:41:46 UTC

Modified files:
  Tag: u2_10_11_02
     ChangeLog ircd/m_account.c

Log message:

Author: Zoot <[EMAIL PROTECTED]> (Modified by Isomer <[EMAIL PROTECTED]>
Log message:

Throw a protocol_violation on AC's that are too long.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.124.2.5 ircu2.10/ChangeLog:1.290.2.124.2.6
--- ircu2.10/ChangeLog:1.290.2.124.2.5  Thu Oct  3 21:03:53 2002
+++ ircu2.10/ChangeLog  Sun Oct  6 02:41:35 2002
@@ -1,3 +1,9 @@
+2002-10-05  Zoot <[EMAIL PROTECTED]> (and Isomer <[EMAIL PROTECTED]>)
+
+       * ircd/m_account.c (ms_account): check the length of the account;
+       ignore accounts that are too long and send a warning through wallops.
+       Updated by Isomer to use protocol_violation.
+
 2002-09-25  David Mansell  <[EMAIL PROTECTED]>
  
        * ircd/m_burst.c: Fixed list walking bug.
Index: ircu2.10/ircd/m_account.c
diff -u ircu2.10/ircd/m_account.c:1.1.2.2 ircu2.10/ircd/m_account.c:1.1.2.2.6.1
--- ircu2.10/ircd/m_account.c:1.1.2.2   Sun Feb  3 12:31:46 2002
+++ ircu2.10/ircd/m_account.c   Sun Oct  6 02:41:36 2002
@@ -19,7 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_account.c,v 1.1.2.2 2002/02/03 20:31:46 kev Exp $
+ * $Id: m_account.c,v 1.1.2.2.6.1 2002/10/06 09:41:36 isomer Exp $
  */
 
 /*
@@ -119,6 +119,10 @@
                              cli_user(acptr)->account, parv[2]);
 
   assert(0 == cli_user(acptr)->account[0]);
+
+  if (strlen(parv[2]) > ACCOUNTLEN) {
+    return protocol_violation(cptr, "Received account (%s) longer than %d for %s; 
+ignoring.", parv[2], ACCOUNTLEN, cli_name(acptr));
+  }
 
   ircd_strncpy(cli_user(acptr)->account, parv[2], ACCOUNTLEN);
   hide_hostmask(acptr, FLAGS_ACCOUNT);
----------------------- End of diff -----------------------

Reply via email to