+2005-08-30 Michael Poole <mdpoole@troilus.org>
+
+ * include/channel.h (PASSLEN): Remove; use KEYLEN instead.
+
+ * ircd/channel.c (mode_parse_upass): Likewise.
+ (mode_parse_apass): Likewise.
+ The inconsistency (in clean_key()) was reported by Reed.
+
2005-08-30 Michael Poole <mdpoole@troilus.org>
* RELEASE.NOTES: Document +D and +d channel modes.
(mode_parse_key): Use it, and check that keys do not start with :.
(mode_parse_upass): Likewise, and adjust for ERR_NOMANAGER.
(mode_parse_apass): Likewise.
+ The key and password changes fix bugs reported by coekie.
2005-08-27 Michael Poole <mdpoole@troilus.org>
#define MODEBUFLEN 200 /**< Maximum length of a mode */
#define KEYLEN 23 /**< Maximum length of a key */
-#define PASSLEN 23 /**< Maximum length of a password */
#define CHANNELLEN 200 /**< Maximum length of a channel */
#define MAXJOINARGS 15 /**< number of slots for join buffer */
unsigned int mode;
unsigned int limit;
char key[KEYLEN + 1];
- char upass[PASSLEN + 1];
- char apass[PASSLEN + 1];
+ char upass[KEYLEN + 1];
+ char apass[KEYLEN + 1];
};
#define BAN_IPMASK 0x0001 /**< ban mask is an IP-number mask */
if (state->flags & MODE_PARSE_SET) {
if (state->dir == MODE_ADD) /* set the new upass */
- ircd_strncpy(state->chptr->mode.upass, t_str, PASSLEN);
+ ircd_strncpy(state->chptr->mode.upass, t_str, KEYLEN);
else /* remove the old upass */
*state->chptr->mode.upass = '\0';
}
if (state->flags & MODE_PARSE_SET) {
if (state->dir == MODE_ADD) { /* set the new apass */
/* Make it VERY clear to the user that this is a one-time password */
- ircd_strncpy(state->chptr->mode.apass, t_str, PASSLEN);
+ ircd_strncpy(state->chptr->mode.apass, t_str, KEYLEN);
if (MyUser(state->sptr)) {
send_reply(state->sptr, RPL_APASSWARN_SET, state->chptr->mode.apass);
send_reply(state->sptr, RPL_APASSWARN_SECRET, state->chptr->chname,