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.
 
Solution
Works for me:

1751586584411.webp

Another caveat is that the message will only be checked for spam if the thread was otherwise going to be visible, so if you have permissions set such that all guest posts go to the approval queue then that will supersede spam checks.
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.
 
1751507090529.webp

This will still allow "test" to pass through without rejecting the message.

1751507138137.webp

One of my forums is being bombarded by Russian spam, and it's annoying to go through to delete every day. There's nothing that I can seem to do with spamPhrases to stop it besides buy an add on to do so, when it appears to be a core feature to do so.

Where is the support, public or private? (License #*******964).

@Chris D @Jeremy P @Kier

Is 2.4 taking away from paid license support and/or public XF board support?
 
Ensure you're using an account subject to spam restrictions to test, and note that /[\u0400-\u04FF]{3,}/u is not a valid regex.

Modified the regex to be valid on regex101:
1751508771395.webp

On Registered and Unregistered / Unconfirmed.
1751508808724.webp

Can still post работоспособность when there is a match as seen.
 
If your account does not meet the spam checking criteria then the bypass permission is not checked at all (there is no check to bypass). You should test with a fresh account that meets the criteria you have configured for spam checking.
 
If your account does not meet the spam checking criteria then the bypass permission is not checked at all (there is no check to bypass). You should test with a fresh account that meets the criteria you have configured for spam checking.
They're coming from guests using a forum that allows guest posting. I do believe a guest should meet all criteria and reject the message, unless I'm missing something?

Edit: Misread 0 meaning.
 
That’s still not a valid regex. You can use the copy button on regex101 to copy it correctly. Note that admin and moderator accounts also bypass the spam check implicitly. I can only confirm that the regex I provided works as anticipated.
 
That’s still not a valid regex. You can use the copy button on regex101 to copy it correctly. Note that admin and moderator accounts also bypass the spam check implicitly. I can only confirm that the regex I provided works as anticipated.
1751538904089.webp
Used the copy button and the regex provided.

1751539027877.webp

How is this explainable? Manually approve should go to the queue, and Reject, from my interpretation, should show a popup that says the message cannot be posted, not post it, and not add it to the queue.
 
Works for me:

1751586584411.webp

Another caveat is that the message will only be checked for spam if the thread was otherwise going to be visible, so if you have permissions set such that all guest posts go to the approval queue then that will supersede spam checks.
 
Solution
Works for me:

View attachment 324383

Another caveat is that the message will only be checked for spam if the thread was otherwise going to be visible, so if you have permissions set such that all guest posts go to the approval queue then that will supersede spam checks.
Well, that would explain it then. I had a private forum where guests could post.

Thank you for your assistance.
 
Another caveat is that the message will only be checked for spam if the thread was otherwise going to be visible, so if you have permissions set such that all guest posts go to the approval queue then that will supersede spam checks.
Thinking about this deeper.

If spamPhrases is set to Reject and not Manually approve, why send them to "Manually approve" (the queue) either way?

If, for instance, you Reject "viagra", you are in essence creating more work than needed as you already rejected the phrase, so why the need to manually approve it?

The logic behind it is backwards, or there really shouldn't be an option to Manually approve or Reject in the first place.

Am I missing something here?
 
Back
Top Bottom