Are you a human (Captcha Substitute)

Posted by Community Admin on 04-Aug-2018 10:39

Are you a human (Captcha Substitute)

All Replies

Posted by Community Admin on 19-Jun-2012 00:00

Marketing are interested in replacing simple captcha in our SF site with this:
http://areyouahuman.com/demo 

I signed up for free and got the .net installation instructions

http://portal.areyouahuman.com/installation/dot_net (requires site login i think)

But initial run through in SF did not work.

Before I delve into it in depth I wondered if anyone had already done this integration, and could give me some tips.

If not i will get it working myself ( eventually) and report back on my findings.

Posted by Community Admin on 19-Jun-2012 00:00

Where are you putting it, on Forms?

Posted by Community Admin on 19-Jun-2012 00:00

no i am chucking it onto a custom widget which is a form which triggers an email...written by a predecessor....

Posted by Community Admin on 19-Jun-2012 00:00
Posted by Community Admin on 19-Jun-2012 00:00

in the course of trying to implement it i did some googling and found a youtube video of a guy who has written scripts to beat it... so not much point in bothering..

http://hackaday.com/2012/05/25/captcha-bot-beats-new-are-you-a-human-playthru-game/ 

Posted by Community Admin on 19-Jun-2012 00:00

Well let me just note then, that a postback event on a control that inherits from the SF forms control happens AFTER the form is submitted, so you need to hook into InitializeControls and wire up the BeforeFormSave event to check the captcah

protected override void InitializeControls(GenericContainer container)
        
            if (!SystemManager.IsDesignMode)
            
                //Hide the form if JS is disabled, it'll let them bypass the required fields.
                base.InitializeControls(container);
                this.BeforeFormSave += new EventHandler<CancelEventArgs>(FormsControlCustom_BeforeFormSave);
            
        

protected void FormsControlCustom_BeforeFormSave(object sender, CancelEventArgs e)
        
            bool canSendEmail = true;
 
            if (this.MyCaptcha != null)
            
                if (!this.MyCaptcha.IsValid)
                
                    e.Cancel = true;
                    this.MyCaptcha.ErrorMessage = this.CaptchaErrorMessage;
                    canSendEmail = false;
                
            
 
            if (canSendEmail)
                SendEmail();
        

This thread is closed