cldrn / cldrn/recaptcha-cakephp
recaptcha via SSH
- Dominant language
- PHP
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Google has changed the address for recaptcha via ssh. You MUST use recaptcha via ssh if your page is https - browsers will not show insecure content.
./app/vendors/recaptcha/recaptchalib.php must be updated as follows:
define("RECAPTCHA_API_SERVER", "http://api.recaptcha.net");
//define("RECAPTCHA_API_SECURE_SERVER", "https://api-secure.recaptcha.net");
define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api");
// change needed see https://groups.google.com/forum/#!topic/recaptcha/V7qswqBnA1o
define("RECAPTCHA_VERIFY_SERVER", "api-verify.recaptcha.net");
Without this change the captcha will not come up at all.
To activate ssh, I found no more intelligent way than to insert
$use_ssl = true;
in the 2nd line after the function declaration of recaptcha_get_html in the same file.
To evaluate the captcha when a user logs on, you can use the following block in the same file:
function beforeFilter() {
if ($this->Captcha->validate()) {
$this->Auth->userScope = array('User.active' => 1);
} else {
$this->Auth->userScope = array('User.active' => 0);
}
}
That's it! Then everything works like a charm.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.