ManagerJosh
Well-known member
I'm noticing that if I unclick "Moderate registrations when this many warning flags are detected" under spam management, XenForo refuses to reject registrations.
Bug?
Bug?
If you untick the "Moderate Registrations" it should reject after one flag is found.
Yeah, looks like the code here is bugged. However, it does look like if you set them both to the same level, the deny should take over.
@@ -127,21 +127,14 @@
{
$flagCount = $this->_getSfsSpamFlagCount($apiResponse);
if ($sfsOptions['moderateThreshold'] && $flagCount >= (int)$sfsOptions['moderateThreshold'])
{
- if ($sfsOptions['denyThreshold'] && $flagCount >= (int)$sfsOptions['denyThreshold'])
- {
- $decision = self::RESULT_DENIED;
- }
- else
- {
- $decision = self::RESULT_MODERATED;
- }
-
- /*if ($sfsOptions['submitRejections'])
- {
- $this->submitSpamUserData($user);
- }*/
+ $decision = self::RESULT_MODERATED;
+ }
+
+ if ($sfsOptions['denyThreshold'] && $flagCount >= (int)$sfsOptions['denyThreshold'])
+ {
+ $decision = self::RESULT_DENIED;
}
if (!$fromCache)
{
Do we need to set them both to the same level after implementing this change in order to get the deny behaviour?I can't reproduce that, though I'm testing with the tweaked code.
Here's the unified diff for library/Model/SpamPrevention.php:
You can add the lines in green and remove the lines in red. (Don't include the leading - or + on those lines.)Rich (BB code):@@ -127,21 +127,14 @@ { $flagCount = $this->_getSfsSpamFlagCount($apiResponse); if ($sfsOptions['moderateThreshold'] && $flagCount >= (int)$sfsOptions['moderateThreshold']) { - if ($sfsOptions['denyThreshold'] && $flagCount >= (int)$sfsOptions['denyThreshold']) - { - $decision = self::RESULT_DENIED; - } - else - { - $decision = self::RESULT_MODERATED; - } - - /*if ($sfsOptions['submitRejections']) - { - $this->submitSpamUserData($user); - }*/ + $decision = self::RESULT_MODERATED; + } + + if ($sfsOptions['denyThreshold'] && $flagCount >= (int)$sfsOptions['denyThreshold']) + { + $decision = self::RESULT_DENIED; } if (!$fromCache) {
We use essential cookies to make this site work, and optional cookies to enhance your experience.