XF 2.3 Disallow Russian text?

frm

Well-known member
I have been hit with a ton of Russian spam lately, and as the forum's language isn't Russian, I sought to block (or flat out 'Reject') the entire language with this spam filter (spamPhrases):
Code:
[а-яА-ЯёЁ]{3,}

But, when I copy a post over and try to post it, it won't reject the message (nor if I set it to 'Manually approve'). Both options send it to the Approval queue, as opposed to Rejecting it (possibly throwing an error that it won't post if that's how 'Reject' is meant to work).

Is the regex wrong (the {3,} is in there in case there's a finger-flick of a keyboard change to accept something that may have been posted in error)?

Is Reject still working as expected, and does my interpretation of Reject just send the message to the Approval queue?

I tested the regex on Regex101, and it does find a match, but how XenForo is handling it is not expected.
 
Any help on disallowing/rejecting any messages containing Russian, Chinese, Japanese, etc. before it goes into the approval queue?

I'm primarily being hit by Russian spam, and I would like it to reject the message (so I can edit the prompt to English a-zA-Z0-9 only).
 
This looks promising for other use cases on other forums that I run, but for now, I just want to block anything that isn't a-zA-Z0-9 and special characters like semi-colons, apostrophes, etc.

1751075291443.webp

I assumed that this would reject messages containing Russian and some Chinese with a reject message (with perhaps a phrase translation) like:

pic001-webp.324173


Is that not how the spamPhrases system is built?
 
This looks promising for other use cases on other forums that I run, but for now, I just want to block anything that isn't a-zA-Z0-9 and special characters like semi-colons, apostrophes, etc.

View attachment 324176

I assumed that this would reject messages containing Russian and some Chinese with a reject message (with perhaps a phrase translation) like:

pic001-webp.324173


Is that not how the spamPhrases system is built?
The first and last are not valid expressions.
 
Back
Top Bottom