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

Duplicate Spam checker not working on profile posts

Jon W

Well-known member
#1
In XenForo_ControllerPublic_Member, the actionSave controller checks for the value of discussion_state instead of message_state. As such, the spam checker never runs and all spam gets through.

To fix, change:
PHP:
            if (!$writer->hasErrors()
                && $writer->get('discussion_state') == 'visible'
                && $spamModel->visitorRequiresSpamCheck()
            )
            {
to:
PHP:
            if (!$writer->hasErrors()
                && $writer->get('message_state') == 'visible'
                && $spamModel->visitorRequiresSpamCheck()
            )
            {