1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-06 08:33:13 +02:00

Put the same extban rule checks in extban_is_ok_nuh_extban() as they

already were in extban_conv_param_nuh_or_extban().
The recursion check was already there, but not the "rule 2 violation"
if ((extban->options & EXTBOPT_ACTMODIFIER) || (extban->options & EXTBOPT_NOSTACKCHILD))

This also backs out the temporary fix 5df1b1b889.
This commit is contained in:
Bram Matthys
2021-09-02 15:51:11 +02:00
parent 459deb3084
commit fa5c9039a2
2 changed files with 17 additions and 11 deletions
+1 -9
View File
@@ -226,15 +226,11 @@ int extban_link_is_ok(BanContext *b)
static char paramtmp[MAX_EB_LEN + 1];
char *matchby; // Matching method, such as 'n!u@h'
char *chan;
static int recurse = 0; /* prevent recursive calls - FIXME do it on higher level */
// Always permit deletion
if (b->what == MODE_DEL)
return 1;
if (recurse)
return 1;
if (b->what2 != EXBTYPE_BAN)
{
if (b->is_ok_checktype == EXBCHK_PARAM)
@@ -253,11 +249,7 @@ int extban_link_is_ok(BanContext *b)
return extban_link_syntax(b->client, b->is_ok_checktype, "Invalid channel");
b->banstr = matchby;
recurse = 1;
int isok = extban_is_ok_nuh_extban(b);
recurse = 0;
if (isok == 0)
if (extban_is_ok_nuh_extban(b) == 0)
return extban_link_syntax(b->client, b->is_ok_checktype, "Invalid matcher");
return 1; // Is ok