Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2007-05-20 14:40:43 UTC
Modified files:
Tag: u2_10_12_branch
ircd/m_burst.c ChangeLog
Log message:
Fix SF#1704458 by sending a protocol violation on the input in question.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.189 ircu2.10/ChangeLog:1.710.2.190
--- ircu2.10/ChangeLog:1.710.2.189 Sun May 20 07:15:58 2007
+++ ircu2.10/ChangeLog Sun May 20 07:40:33 2007
@@ -1,5 +1,11 @@
2007-05-20 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/m_burst.c (netride_modes): Return -1 if someone tries to
+ remove modes in the burst.
+ (ms_burst): Check for, and handle, that protocol violation.
+
+2007-05-20 Michael Poole <[EMAIL PROTECTED]>
+
* ircd/m_privs.c (mo_privs): Report "no such nickname" for unknown
nicks in the list. (Unfortunately, the nick is lost before ms_privs.)
Index: ircu2.10/ircd/m_burst.c
diff -u ircu2.10/ircd/m_burst.c:1.40.2.3 ircu2.10/ircd/m_burst.c:1.40.2.4
--- ircu2.10/ircd/m_burst.c:1.40.2.3 Sat Jan 13 10:47:19 2007
+++ ircu2.10/ircd/m_burst.c Sun May 20 07:40:33 2007
@@ -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_burst.c,v 1.40.2.3 2007/01/13 18:47:19 entrope Exp $
+ * $Id: m_burst.c,v 1.40.2.4 2007/05/20 14:40:33 entrope Exp $
*/
/*
@@ -115,6 +115,8 @@
assert(modes && modes[0] == '+');
while (*modes) {
switch (*modes++) {
+ case '-':
+ return -1;
case 'i':
result |= MODE_INVITEONLY;
break;
@@ -282,7 +284,13 @@
if (parv[param][0] != '+')
continue;
check_modes = netride_modes(parc - param, parv + param, chptr->mode.key);
- if (check_modes)
+ if (check_modes < 0)
+ {
+ if (chptr->users == 0)
+ sub1_from_channel(chptr);
+ return protocol_violation(sptr, "Invalid mode string in BURST");
+ }
+ else if (check_modes)
{
/* Clear any outstanding rogue invites */
mode_invite_clear(chptr);
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches