[TAC] Stop Human Spam

[TAC] Stop Human Spam [Paid] 1.4.8

No permission to buy ($19.00)
I think I found a little bug, I have disabled "Apply Link-Post-Rules To Email Addresses" and posts with Email addresses are going to moderation queue. (v 1.3.7)
This doesn't seems to be normal.
 
Could it be that they are getting picked up by something else ? What does it say in the logs (I can't remember if I log moderated events now)

could it be that it's getting picked up by "Moderate Banned Word Content"
 
Since turning on this addon, my members cannot post links.
Even though they meet all the conditions to do so.
I suspect this may be because we do not use Likes for posts. So the likes to post ration is set to 0, which becomes 0%, which is not a valid number.
.webp
 
@Alfa1
Should work fine with 0 likes, see tests below

Just had a quick look at the code

Nothing strange going on for min conditions:

Code:
        $fetchOptions['message_count'] >= $fetchOptions['min_posts'] &&
        $fetchOptions['like_count'] >= $fetchOptions['min_likes'] &&
        $fetchOptions['days_registered'] >= $fetchOptions['min_reg_days'] &&
        $fetchOptions['like_post_ratio'] >= $fetchOptions['min_like_post_ratio']

I've just tried with the settings: 0 likes and 0 ratio, and a user can post fine with no likes
when the user has 1 like, and the settings are: 1 like and 0 ratio, the user can post fine


I've tried the settings: 5 likes and 0 % ratio, with a user with 5 likes and about 10 post ... the user can post links fine
If I pump the number of threads for that user up to a few hundred, still no issue, the user can post links fine

I've had a look at the ratio calculation, and can't see anything wrong:

Code:
        $visitor = XenForo_Visitor::getInstance();  
        $message_count = $visitor->get('message_count');
        $like_count = $visitor->get('like_count');
        $register_date = $visitor->get('register_date');
        $like_post_ratio = round($like_count && $message_count? ($like_count/$message_count)*100: 0);
        $days_registered = floor((time() - $register_date)/(60*60*24));


I've tried setting the min post to 50.. still the user can post links fine (with a few hundred posts)

So... I haven't been able to reproduce it, does it say anything in the stopHumanSpam logs for that user, or is it exactly the same message

If you do not use likes for posts, where are those likes from above?
would the likes be pushed in somewhere else (via another plugin) other than
$like_count = $visitor->get('like_count');


I really need more info to fix this, if it is a bug... certainly looks like one

If you set each of the settings one by one (days reg, likes, ratio, posts) to 0, at which point can the users start creating links. I've tried all the combinations, including the one mentioned and not be able to reproduce so far
 
Last edited:
does it say anything in the stopHumanSpam logs for that user
Is there any way to search the SHS logs?
The log shows that the member from the screenshot tried to add their email in a conversation. Another valid member added a link to a post. The logs do not show anything about why they are blocked from posting.

I see that SHS has blocked a mass of spammers from posting. This addon is really brilliant! But as there was no report to the staff all the spammers are still active on the forums.

Please implement a function to post SHS log entries to the XF report center. This would allow my moderator to catch spammers much quicker.

I see that this addon also highlights users of which is not clear if they are a spammer. In such case the included link could be spam but its hard to tell. It would be useful if such users could be flagged and if the number of link attempts is counted, so that the next attempt already shows they have been trying before.

I think it would be very useful to analyse all texts from the SHS log entries by users that we used the Spam Cleaner on. This would highlight words that are often used by spammers on our site and could be useful to catch more spammers.
 
The logs are permission controlled, so if they have acp access, it's just a matter if giving them access to the logs
(I realises, giving ACP access to mods is not for everyone)

But anyway, they are tied into the xenforo viewlogs permissions:
Code:
    protected function _preDispatch($action)
    {
        $this->assertAdminPermission('viewLogs');
    }

... no search functionally for the logs, it wouldn't be hard to implement, I've done it with most the other spam plugins, not sure why I never added it here... considered,
I've got a little bit of work to do on shs, so will look into this

But pushing data to the moderators would take a fair amount of work.... I guess it could be simply done by pushing out a xenforo "report", but since the thread/post is not created (blocked by shs), I'm not really sure how this would be done (what would the report attached to).... There is already the option to "Moderate Failed Link-Post-Rules" and "moderated banned words", this does then push the content to your moderators, I don't believe I add a flag to say why it is moderated, this is something that wouldn't take much work and I'd consider (but if a mod looks at the post, it's usually fairly obvious)

... Moderating the content then pushes it for your moderators to look at (which kind of creates more work for them instead of less), so that's kind of already there (there's just no "spam" flag).

So as far as "report to the staff" is concerned, I think it's a case of re-inventing the wheel, the option to moderate content is already available in SHS (and pretty much already does this)
 
Last edited:
I realises not, giving ACP access to mods is not for everyone
Right on the mark there.
I guess it could be simply done by pushing out a xenforo "report", but since the thread/post is not created (blocked by shs), I'm not really sure how this would be done (what would the report attached to)....
The report should tie to the profile. Optimally there would be a 'spam' tab on profile listing the log entries.
There is already the option to "Moderate Failed Link-Post-Rules" and "moderated banned words", this does then push the content to your moderators
This would work if it applied to conversations, profile as well. We cant afford to miss conversation spam or profile spam.
Moderating the content then pushes it for your moderators to look at (which kind of creates more work for them instead of less)
The quicker a spammer is identified, the more work is saved. That's why this addon is so amazing! It saves us a ton of work. The main issue with it is that it needs a administrator to go keep an eye on the logs every day.
In my experience its very important to quickly kill spammers. Therefore moderators need to be alerted about spammer action instantly. The report center or moderation queue would work fine for this if it can hold all spam from all content types.
 
I'm running into the following issue (not sure if it's by design or not):

I installed the plugin w/ 3 post minimum, 0 for everything else. If I turn on "Moderate Failed Link-Post-Rules", I get a generic "server error occurred" if I post a new thread with a link. It hits the moderation queue, but in the server logs, I see:

ErrorException: Undefined variable: thread - library/Tac/StopHumanSpam/ControllerPublic/Forum.php:177
ErrorException: Undefined variable: forum - library/Tac/StopHumanSpam/ControllerPublic/Forum.php:177
ErrorException: Argument 1 passed to XenForo_Model_Thread::canViewThread() must be of the type array, null given, called in /library/Tac/StopHumanSpam/ControllerPublic/Forum.php on line 177 and defined - library/XenForo/Model/Thread.php:795

If I post a link in an existing thread, it gets posted and shows awaiting moderation.

If I uncheck "Moderate Failed Link-Post-Rules", everything works as expected (the correct error message pops up for the user).
 
No errors are by design.
This looks like it's related to an adjustment I made last version (it was a an updated related to a particular forum)

I can see what the fix is, I'll updated and send it out when back from work today
 
This add-on has helped us a lot.

Checked: Turn On Stop Banned Words For Thread Titles
Banned Thread Title Words *.co

If I try to post a link I get the message that it's not allowed. However a lot of spammers are posting links on our site. Any ideas?

http spam.webp
 
Are you saying that you have *.co in the banned words titles, but they are still able to post threads with titles bla.org and bla.com in the thread title?

I'll try to reproduce it tomorrow after work, it might be due to the extension after the .com/etc
I believe it's assumed [*.com] ends in the word .com, but starts with anything before it

to prevent bla.com/etc, you would need to block [*.co*] not [*.co]
I can't remember if I designed it to be able to do this, give it a try and let me know the result, if this doesn't solve it let me know and I'll modify it so that [*.co*] has the desired affect
 
Just checked my settings [*.co*] should work to stop bla.com/bla

Since I use [*.co.*] to block bla.co.uk or bla.co.other, so it's set up to do this

The thread links you posted above all get around [*.com] and [*.co] but wont get around [*.co*]
- But be careful not to catch legit users just posting real titles, for instance
"my thread title.come and see" - or what ever real thread titles this method might catch
 
try
*.co*

also, when testing, try with the exact text they used.

Let me know, I'll have a look at this tomorrow after work, it's a bit late for me to look at it now (1am)
 
Without changing it I tested with the admin account and it doesn't allow the post. Somehow they are bypassing it?

nope.webp
 
Top Bottom