From: michi Date: Tue, 14 Apr 2020 14:58:04 +0000 (+0200) Subject: Fix hostmask cloaking bug for IPv6 too X-Git-Tag: rel-26-rc1~34 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git;a=commitdiff_plain;h=13b8324c4a6f46e18e58883630808bc8c4ed9e80 Fix hostmask cloaking bug for IPv6 too --- diff --git a/src/ngircd/client.c b/src/ngircd/client.c index a453312c..118431b1 100644 --- a/src/ngircd/client.c +++ b/src/ngircd/client.c @@ -338,8 +338,8 @@ Client_SetHostname( CLIENT *Client, const char *Hostname ) assert(Hostname != NULL); /* Only cloak the hostmask if it has not yet been cloaked (the period - * indicates it's still an IP address). */ - if (Conf_CloakHost[0] && strchr(Client->host, '.')) { + * or colon indicates it's still an IP address). */ + if (Conf_CloakHost[0] && strpbrk(Client->host, ".:")) { char cloak[GETID_LEN]; strlcpy(cloak, Hostname, GETID_LEN);