How to use unicode chars in spamfilter regex?

If your UnrealIRCd is up and running but you have a question about it, then use this forum.
(NOT for installation or connecting issues! Use the other forum instead.)

Moderator: Supporters

Post Reply
R4tt
Posts: 9
Joined: Tue Sep 12, 2017 9:07 pm

How to use unicode chars in spamfilter regex?

Post 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?
Syzop
UnrealIRCd head coder
Posts: 2117
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: How to use unicode chars in spamfilter regex?

Post 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
R4tt
Posts: 9
Joined: Tue Sep 12, 2017 9:07 pm

Re: How to use unicode chars in spamfilter regex?

Post by R4tt »

Thanks. Then I have to upgrade unrealircd first.
Post Reply