svn: 2096
@@ -122,7 +122,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
* Fixed a bug where a bot would stop trying to connect to servers if using ipv6.
* New channels get a default chanset of: flood-ctcp 5:30
* Tempdir is now chosen from a list as follows: (hub) ./tmp/ (leaf) ~/.ssh/..., /tmp/, /usr/tmp/, /var/tmp/, ./
-
+* Fixed a bug in the hash creation of cookies due to an ircd stripping excess '*' in cookies.
1.2.2
* Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.
@@ -54,6 +54,7 @@
#define NOTENAMELEN ((HANDLEN << 1) + 1)
#define BADPASSCHARS "-+"
#define LISTSEPERATORS ",=:; "
+#define BADREPEATEDRAND "*?"
#if (NICKMAX < 9) || (NICKMAX > 32)
@@ -437,6 +437,11 @@ void make_rand_str(char *s, size_t len)
if (s[j] == 33 || s[j] == 37 || s[j] == 34 || s[j] == 40 || s[j] == 41 || s[j] == 38 || s[j] == 36) /* no % ( ) & */
s[j] = 'a' + randint(26);
+
+ if (j && strchr(BADREPEATEDRAND, s[j]) && s[j] == s[j - 1]) {
+ while (s[j] == s[j - 1])
+ s[j] = 'A' + randint(26);
+ }
}
if (strchr(BADPASSCHARS, s[0]))