mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-03 08:33:12 +02:00
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:
+10
-5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user