1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 07:33:13 +02:00

BUILD : 1.7.3 (171) BUGS : NOTES : Fixed big with long NSGuestNickPrefixes. We just used them in a snprintf without checking their size. Fixed a second guestnick bug as well: if compiled for hybrid guestnum was increased, tho it was never used.

git-svn-id: svn://svn.anope.org/anope/trunk@171 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@119 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-06-06 18:16:08 +00:00
parent 019521bc09
commit 1c908480b6
6 changed files with 20 additions and 10 deletions
+1
View File
@@ -6,6 +6,7 @@ Provided by Anope Dev. <dev@anope.org> - 2004
05/24 A New NSNickTracking directive to provide nick tracking. [ #71]
05/21 A Auto enforce upon AKICK addition. [ #63]
05/21 A New file docs/OLDCHANGES contains all change history. [ #65]
06/06 F Fixed a bug with long NSGuestNickPrefixes. [ #00]
06/04 F Buffer initialization for encrypted MySQL passwords. [ #86]
06/04 F Rewrite of del_exception() fixing segfault and memory leak. [ #78]
06/04 F MemoServ send limit does no longer apply for services operators. [ #84]
+6 -1
View File
@@ -1029,7 +1029,12 @@ int read_config(int reload)
NSDefFlags |= NI_MEMO_RECEIVE;
}
CHECK(NSGuestNickPrefix);
CHECK(NSGuestNickPrefix); /* Add safety check */
if (NSGuestNickPrefix && (strlen(NSGuestNickPrefix) > 21)) {
error(0, "Value of NSGuestNickPrefix must be between 1 and 21");
retval = 0;
}
CHECK(NSDefLanguage);
if (NSDefLanguage) {
NSDefLanguage--;
+1 -1
View File
@@ -634,7 +634,7 @@ E NickAlias *nalists[1024];
E NickCore *nclists[1024];
E NickRequest *nrlists[1024];
E int guestnum;
E unsigned int guestnum;
E void insert_requestnick(NickRequest * nr);
E void alpha_insert_alias(NickAlias * na);
-4
View File
@@ -23,7 +23,6 @@ void load_hs_dbase_v1(dbFILE * f);
void load_hs_dbase_v2(dbFILE * f);
void load_hs_dbase_v3(dbFILE * f);
static int guestnum; /* Current guest number */
HostCore *head = NULL; /* head of the HostCore list */
HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent,
char *vHost, char *creator, int32 tmp_time);
@@ -94,9 +93,6 @@ void moduleAddHostServCmds(void)
void hostserv_init(void)
{
moduleAddHostServCmds();
guestnum = time(NULL);
while (guestnum > 9999999)
guestnum -= 10000000;
}
/*************************************************************************/
+6 -3
View File
@@ -23,7 +23,7 @@ NickAlias *nalists[1024];
NickCore *nclists[1024];
NickRequest *nrlists[1024];
int guestnum; /* Current guest number */
unsigned int guestnum; /* Current guest number */
#define TO_COLLIDE 0 /* Collide the user with this nick */
#define TO_RELEASE 1 /* Release a collided nick */
@@ -1660,12 +1660,15 @@ static void collide(NickAlias * na, int from_timeout)
* per second. So let use another safer method.
* --lara
*/
/* So you should check the length of NSGuestNickPrefix, eh Lara?
* --Certus
*/
snprintf(guestnick, sizeof(guestnick), "%s%d", NSGuestNickPrefix,
guestnum++);
#ifdef IRC_HYBRID
kill_user(s_NickServ, na->nick, "Services nickname-enforcer kill");
#else
snprintf(guestnick, sizeof(guestnick), "%s%d", NSGuestNickPrefix,
guestnum++);
notice_lang(s_NickServ, na->u, FORCENICKCHANGE_CHANGING, guestnick);
send_cmd(NULL, "SVSNICK %s %s :%ld", na->nick, guestnick, time(NULL));
na->status |= NS_GUESTED;
+6 -1
View File
@@ -8,10 +8,15 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="3"
VERSION_BUILD="170"
VERSION_BUILD="171"
# $Log$
#
# BUILD : 1.7.3 (171)
# BUGS :
# NOTES : Fixed big with long NSGuestNickPrefixes. We just used them in a snprintf without checking their size. Fixed a second
# guestnick bug as well: if compiled for hybrid guestnum was increased, tho it was never used.
#
# BUILD : 1.7.3 (170)
# BUGS : 86
# NOTES : Buffer initialization for encrypted MySQL passwords.