TPU: Detect and Block Spam Registrations

TPU: Detect and Block Spam Registrations 1.6.6

No permission to download
I just got a few errors in my server logs.

Error Info
Code:
ErrorException: Undefined index: purgedays - library/TPUDetectSpamReg/Cleanup.php:18
Generated By: Unknown Account, Today at 5:01 PM

Stack Trace
Code:
#0 /home/nginx/domains/mydomain.com/public/library/TPUDetectSpamReg/Cleanup.php(18): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/nginx/dom...', 18, Array)
#1 [internal function]: TPUDetectSpamReg_Cleanup::cleanup(Array)
#2 /home/nginx/domains/mydomain.com/public/library/XenForo/Model/Cron.php(357): call_user_func(Array, Array)
#3 /home/nginx/domains/mydomain.com/public/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#4 /home/nginx/domains/mydomain.com/public/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_Cron->execute(Array, Array, 7.9999969005585, '')
#5 /home/nginx/domains/mydomain.com/public/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.9999969005585, '', false)
#6 /home/nginx/domains/mydomain.com/public/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#7 /home/nginx/domains/mydomain.com/public/deferred.php(23): XenForo_Model_Deferred->run(false)
#8 {main}

Request State
Code:
array(3) {
  ["url"] => string(38) "http://www.mydomain.com/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(3) {
    ["_xfRequestUri"] => string(42) "/index.php?threads/the-forum-way-v4-2.3/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

I receive the same error and it reappears when I run the cleanup cron you mentioned above @W1zzard.

"Automatically delete auto-moderated users, who never made any posts, who haven't logged on for x days:" is set to "0".

I updated from TPU 1.5->1.6.3 yesterday (when it started). I'm running XF 1.4.9.

Edit: Error stopped appearing when I disabled "Submit registration data to developer". Noticed that was a new option.
 
Last edited:
Edit: Error stopped appearing when I disabled "Submit registration data to developer". Noticed that was a new option.
This shouldn't be related.

Cleanup is a new option, maybe the default value isn't working properly, so you have to click save on the addons options page once to make it work.

Could you re-enable the "submit registration data" option and check if the error message re-appears?
 
This shouldn't be related.

Cleanup is a new option, maybe the default value isn't working properly, so you have to click save on the addons options page once to make it work.

Could you re-enable the "submit registration data" option and check if the error message re-appears?

I guess it must've been the save that did it. The error is not displaying anymore even with that option enabled.
 
I guess it must've been the save that did it. The error is not displaying anymore even with that option enabled.
Now that I looked at it again this makes perfect sense.

The three options fields in "Minimum score required to moderate all posts" are combined into a single settings variable. On an upgrade there already exists a value, which won't be overwritten during update, but that setting doesn't include the "automatically delete" variable, until you've saved once.

I'll add an extra check to the code and release a new version soon. Thanks for reporting!
 
@W1zzard

As you're collecting data for an Anti-Spam service, I was wondering if you could PM me. I am starting a full risk assessment service and perhaps you'd like to combine ideas.

Likewise, you are welcome to use Block Disposable Email Addresses for your project, even if you have no interest in joining forces!
 
@W1zzard seem to be getting this in my server error log with PHP 5.6.12 + Zend OpCache

Code:
#0 /library/TPUDetectSpamReg/Cleanup.php(18): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/nginx/dom...', 18, Array)
#1 [internal function]: TPUDetectSpamReg_Cleanup::cleanup(Array)
#2 /library/XenForo/Model/Cron.php(357): call_user_func(Array, Array)
#3 /library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#4 /library/XenForo/Model/Deferred.php(294): XenForo_Deferred_Cron->execute(Array, Array, 7.9999959468842, '')
#5 /library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.9999959468842, '', false)
#6 /library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#7 /cli/defer.php(32): XenForo_Model_Deferred->run(false)
#8 {main}

edit: ah @DroidOne already mentioned this TPU: Detect and Block Spam Registrations !

Also would be nice if there was an option to whitelist hostname + port combinations ? i.e. whitelist specific hostname on port 80 :)

cheers
 
Last edited:
This is a fantastic add-on which has prevented countless spammers on my forum. Big thumbs up!

One small problem: I have added a number of email domains in the 'Email address' field in the options for this add-on. I have lines a'la
Code:
+10|*@spamdomain.tld
And I've set 'Minimum score required to reject user' to 6. However, several spammers with these email domains end up being moderated, not rejected. And they get moderated not because of the email domain, but because of other factors.

So, am I doing something wrong? Or is the add-on not taking the 'Email address' field into account for some reason?
 
After re-installing XF on a new OS (Debian 8.1) I got this in my XF error log:
ErrorException: Fatal Error: Call to undefined function curl_init() - library/TPUDetectSpamReg/ModelSpamPrevention.php:74
Which I think can be resolved on Debian (and Ubuntu) with:
sudo apt-get install php5-curl
 
Love this addon. It has eliminated 99% of my spam.

Would love to see an option to add points for posts containing non-English language text.
 
Hi All!

I just updated to the newest version of TPU and now I'm getting this error over and over:

ErrorException: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set - library/TPUDetectSpamReg/ModelSpamPrevention.php:77

TPU was working fine in the older version and I haven't changed anything on my server that should have caused this to start happening.

Any ideas why I'm getting this error now and didn't get it before updating TPU ?

I hope there is a solution that doesn't involve messing with my server php, etc. settings.

Thanks!
 
Thanks @RoldanLT for the quick reply! I don't think I'm using Centminmod. I'm on CENTOS 5.10

I don't think anything on my server has changed other than upgrading to the newer version. Did something get updated / changed in a recent update to TPU that now requires a different server setting?
 
BTW, I'm on WHM and have "Enable php open_basedir Protection." selected. I can disable it on a domain level, but I'm not sure that will solve the problem or be a wise choice to turn that protection off.
 
After re-installing XF on a new OS (Debian 8.1) I got this in my XF error log:

Which I think can be resolved on Debian (and Ubuntu) with:
sudo apt-get install php5-curl

Currently running into the same issue on 1.4. Did this solve the issue?
 
Top Bottom