Captcha misentry forces registering users back to home page?

I realize that this may have already been discussed, but I cannot find it through the search on this site! So, I am posting this, hoping for a possible tweak or fix or suggestion from someone.

I see that if someone tries to register on the site and misenters the captcha, they are redirected back to the home page. Does this have an intended purpose, besides the fact that it would TERRIBLY annoy a potential member of my site so badly that they give up right away and forget about trying to register?!

  • Cash, I shut off flexreg. I changed the code to this:

        function captcha_verify_action_hook($hook, $entity_type, $returnvalue, $params)
        {
            $token = get_input('captcha_token');
            $input = get_input('captcha_input');

            if (($token) && (captcha_verify_captcha($input, $token)))
                return true;

            register_error(elgg_echo('captcha:captchafail'));
            error_log(REFERER);
            forward(REFERER);

            return false;
        }

    And I got this in the error logs:

    [Mon Aug 30 15:56:10 2010] [error] [client 127.0.0.1] -1

    That's all that shows up in the error logs and I get redirected back to the home page.

  • That means REFERER is defined correctly. How about if you add this:

    error_log($_SERVER['HTTP_REFERER']);

  • And now I get:

    [Mon Aug 30 16:31:21 2010] [error] [client 127.0.0.1]

    Nothing follows after the "[client 127.0.0.1]"

  • That's problem - the referrer is not being populated. Either your browser is not sending it or there is something odd with your server. I'm surprised you're not having other problems with Elgg as $_SERVER['HTTP_REFERER'] is used in several places.

    What browser are you using and any unusual add-ons?

  • Aha, Cash. Interesting that you bring up browser. I was using Opera. I switched over to Internet Explorer and I did not get thrown to the home page. Instead, it stayed on the registration form page. So, what would cause this, with Opera? ...The bad thing is, the majority of my users would user Opera. So, this is a must to fix. ...Thanks for digging into this problem!