From 425a9b978a9089b4d73dae5ce6972fb74501d46a Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 5 Jun 2026 10:06:33 +0200 Subject: [PATCH] Fix deny channel::mask not working if security group. Reported by PeGaSuS. --- src/conf.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/conf.c b/src/conf.c index 6c51a2718..cfd6ac2cd 100644 --- a/src/conf.c +++ b/src/conf.c @@ -10874,12 +10874,22 @@ int _test_deny(ConfigFile *conf, ConfigEntry *ce) char has_mask = 0, has_match = 0; for (cep = ce->items; cep; cep = cep->next) { - if (config_is_blankorempty(cep, "deny channel")) + if (!strcmp(cep->name, "match")) + { + has_match = 1; + test_match_block(conf, cep, &errors); + } + else if (!strcmp(cep->name, "mask")) + { + has_mask = 1; + test_match_block(conf, cep, &errors); + } + else if (config_is_blankorempty(cep, "deny channel")) { errors++; continue; } - if (!strcmp(cep->name, "channel")) + else if (!strcmp(cep->name, "channel")) { if (has_channel) { @@ -10929,16 +10939,6 @@ int _test_deny(ConfigFile *conf, ConfigEntry *ce) } has_class = 1; } - else if (!strcmp(cep->name, "match")) - { - has_match = 1; - test_match_block(conf, cep, &errors); - } - else if (!strcmp(cep->name, "mask")) - { - has_mask = 1; - test_match_block(conf, cep, &errors); - } else { config_error_unknown(cep->file->filename,