1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed I must "Moderate registrations when this many warning flags are detected"

Discussion in 'Resolved Bug Reports' started by ManagerJosh, Aug 31, 2013.

  1. ManagerJosh

    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?
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    There should be a setting about rejecting accounts.

    However, if you don't want to moderate or reject, you should turn off the spam features completely.
     
  3. ManagerJosh

    ManagerJosh Well-Known Member

    This is the behavior I want to see:

    If one more flags are detected, users are to be rejected. They are not to be sent into moderation. I can't use the setting below because it creates a logic error. I can't uncheck "moderate registrations" because then reject registrations are not being observed.

    Capture - XF.JPG
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    If you untick the "Moderate Registrations" it should reject after one flag is found.
     
  5. ManagerJosh

    ManagerJosh Well-Known Member

    For some strange reason on our XF install, it's not. It's approving them. We can tell because when we do a verification manually via SFS, we see at least one flag on the system, but it didn't stop the registration
     
  6. AWS

    AWS Well-Known Member

    The same happens on my install of 1.2.1.
     
  7. Mike

    Mike XenForo Developer Staff Member

    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.
     
  8. ManagerJosh

    ManagerJosh Well-Known Member

    Mike, even with two flags, it's not rejecting at the moment.

    The latest example would be the following flags we see queued up:

    email: weatheg5700@gmail.com
    IP: 5.135.160.149


    BTW, should I flag a report into the bug tracking area?
     
  9. Mike

    Mike XenForo Developer Staff Member

    I can't reproduce that, though I'm testing with the tweaked code.

    Here's the unified diff for library/Model/SpamPrevention.php:
    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)
                    {
    You can add the lines in green and remove the lines in red. (Don't include the leading - or + on those lines.)
     
  10. dieg0

    dieg0 Active Member

    Do we need to set them both to the same level after implementing this change in order to get the deny behaviour?
     
  11. Mike

    Mike XenForo Developer Staff Member

  12. MikeMpls

    MikeMpls Well-Known Member

    Thanks, that explains what I've been seeing since I upgraded one of my busier (and more targeted by spammers) sites to 1.2.1.
     

Share This Page