1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 15:03:13 +02:00

- Temporary workaround for spamfilter bug: action 'viruschan' in combination with the

'u' (user) target can cause severe problems (crashes, etc). For now, we have disabled
  'viruschan' in combination with 'u'. A real fix will require quite some work, sorry.
This commit is contained in:
Bram Matthys
2005-08-19 15:55:06 +00:00
parent b340844aed
commit 247e2ea6d5
2 changed files with 32 additions and 0 deletions
+3
View File
@@ -832,3 +832,6 @@
causing close_connection to read from it (when deciding on doing a quick reconnect).
Could have caused a crash, although nobody ever reported one...
- Removed useless strncpyzt with dest==src.
- Temporary workaround for spamfilter bug: action 'viruschan' in combination with the
'u' (user) target can cause severe problems (crashes, etc). For now, we have disabled
'viruschan' in combination with 'u'. A real fix will require quite some work, sorry.
+29
View File
@@ -742,6 +742,17 @@ char reason[512];
}
actionbuf[0] = banact_valtochar(action);
actionbuf[1] = '\0';
/* (temporary?) disable 'u' (user) target in combination with 'viruschan' action -- else causes crashes
* SIDENOTE: This workaround is present at two places, 1) here, and 2) at the checking/banning code,
* why? well because there might be existing *lines! which is a very real assumption...
*/
if ((action == BAN_ACT_VIRUSCHAN) && (targets & SPAMF_USER))
{
sendnotice(sptr, "Unfortunately, at least for the moment, the action 'viruschan' is incompatible with target 'u' (user) "
"for technical reasons. It caused crashes in previous versions, and has been (temporary?) disabled for now.");
return -1;
}
/* now check the regex... */
p = unreal_checkregex(parv[6],0,1);
@@ -2299,6 +2310,24 @@ char *str;
if (IsVirus(sptr)) /* Already tagged */
return 0;
if (!IsClient(sptr))
{
/* Problem! viruschan selected, but we got a just connected user,
* this causes severe problems (atm). [this check is also present
* when adding the thing]. We just kill them instead for now...
* which seems the best alternative: adding shun/*lines is clearly
* not what the oper/service wanted, blocking/tempshunning does not
* give the user any hint about what is going in, and KILL is most
* obvious/clear, and less intrussive (you remove the spamfilter and
* the user can access the network again). -- Syzop
*/
sendto_realops("[WORKAROUND] Warning: spamfilter on target 'u' (user) + target 'viruschan' "
"is (temporary) no longer supported because it caused crashes, "
"user %s is killed instead!", sptr->name);
return place_host_ban(sptr, BAN_ACT_KILL,
unreal_decodespace(tk->ptr.spamf->tkl_reason), 0);
}
ircsprintf(buf, "0,%s", SPAMFILTER_VIRUSCHAN);
xparv[0] = sptr->name;
xparv[1] = buf;