Page 1 of 1

How to use unicode chars in spamfilter regex?

Posted: Thu Jul 06, 2023 12:10 pm
by R4tt
Spambots are often use hidden unicode characters to bypass hardcoded keyword spamfilter. I noticed unrealircd has a nice in build spamfilter feature. But I've trouble to get it working with regex and unicode characters.

But I'm getting error:

Code: Select all

/SPAMFILTER add -regex cpNn gline - spam TE\x{200B}ST
Error in regex 'TE\x{200B}ST': character code point value in \x{} or \o{} is too large (at character #9)
Regex is valid: https://regex101.com/r/iUSZCl/1

How I can solve that?

Re: How to use unicode chars in spamfilter regex?

Posted: Thu Jul 06, 2023 12:23 pm
by Syzop
Since UnrealIRCd 6.0.7 you can use this setting to make Spamfilter UTF8 aware, it will be default in next release (6.1.2):

Code: Select all

set { spamfilter { utf8 yes; } }
See https://github.com/unrealircd/unrealirc ... ncements-3

Re: How to use unicode chars in spamfilter regex?

Posted: Thu Jul 06, 2023 12:38 pm
by R4tt
Thanks. Then I have to upgrade unrealircd first.