HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

BotStopApproval addon doesn't work with social login. Provided a patch.

edited May 2014 in Feedback

I noticed that the BotStopApproval plugin doesn't work with social logins @peregrine‌

So I edited class.BotStopApproval.plugin.php and added this:

// Patch to enable social login
            $url = $_SERVER['QUERY_STRING'];

And replaced the if statement below that to:

 if ($correctanswer == "N" && strpos($url, "facebook") === false && strpos($url, "openid.net") === false) {
             $Sender->Validation->AddValidationResult('BotCheck2',T('Please re-read all questions again and answer again'));
            $Sender->EventArguments['Valid'] = FALSE; 
            }

Facebook and OpenID logins are working well now. I think Twitter logins can also be solved in a similar manner. I don't use Twitter login so I can't say anything about that, but maybe someone will find a solution.

Please add this little patch in your next plugin update. It will help a lot of users who use social logins. :smile:

Thanks a lot. Awaiting your reply. :D

Tagged:

Comments

  • peregrineperegrine MVP
    edited May 2014

    if someone else validates that it works and posts that it works with your mod, I will gladly add the change, since I can't test your mod.

    thanks for enhancement, your snippet with line changes should suffice.

    If there is silence then ...

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited May 2014

    Sir, I can't edit the post anymore. Why not contact a mod and get it removed?

    @hgtonight‌ would you please remove the pastebin link for @peregrine‌
    I can't edit the post anymore. :(

  • peregrineperegrine MVP
    edited May 2014

    apparently no one can delete the line. Too difficult for a moderator to delete the line.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • AdrianAdrian Wandering Spirit Montreal MVP

    The line is removed.

  • @Adrian‌ thanks a lot

    @peregrine its all done now. Relax man.

  • Awesome, that works!!!

Sign In or Register to comment.