Log message:
Fix mr_pong failing for cookies larger than 0x7fffffff.
Fix auth_set_username always returning "invalid username".
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1622
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
+2006-02-17 Alex Badea <vamposdecampos@gmail.com>
+
+ * 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 <mdpoole@troilus.org>
* include/res.h (NXDOMAIN): Define.
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;
}
/*
if (!lower && !upper)
goto badid;
/* Final character must not be punctuation. */
- if (!IsAlnum(ch))
+ if (!IsAlnum(last))
goto badid;
}