Fix require authentication { } not allowing SASL users in.

It was behaving like a ban user { } block.

Reported by Jellis in https://bugs.unrealircd.org/view.php?id=6464
This commit is contained in:
Bram Matthys 2024-08-30 19:59:56 +02:00
parent bfb41612c8
commit 99bc061a74
No known key found for this signature in database
GPG key ID: BF8116B163EAAE98

View file

@ -3422,13 +3422,18 @@ int find_tkline_match_matcher(Client *client, int skip_soft, TKL *tkl)
/* For config file ban { } we use security groups instead of simple user/host */
if (tkl->ptr.serverban->match)
{
if (user_allowed_by_security_group(client, tkl->ptr.serverban->match))
/* If hard-ban, or soft-ban&unauthenticated.. */
if (!(tkl->ptr.serverban->subtype & TKL_SUBTYPE_SOFT) ||
((tkl->ptr.serverban->subtype & TKL_SUBTYPE_SOFT) && !IsLoggedIn(client)))
{
if (find_tkl_exception(tkl->type, client))
return 0; /* exempted */
return 1; /* banned */
if (user_allowed_by_security_group(client, tkl->ptr.serverban->match))
{
if (find_tkl_exception(tkl->type, client))
return 0; /* exempted */
return 1; /* banned */
}
return 0;
}
return 0;
}
tkl_uhost(tkl, uhost, sizeof(uhost), NO_SOFT_PREFIX);