aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-05-10 23:32:27 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-05-10 23:32:27 -0400
commit3f9e9b581b8aad15ccfa01128c0dac8fd648e6ac (patch)
tree8e71f1bc77b0a6727f8e3f97f153171d574ddb3f /phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
parent6ac6680639fc892141fa6c846c63cbdea12c166a (diff)
parentf670aefd3694ad0de804414e8d9880dfa1c920b3 (diff)
downloadforums-3f9e9b581b8aad15ccfa01128c0dac8fd648e6ac.tar
forums-3f9e9b581b8aad15ccfa01128c0dac8fd648e6ac.tar.gz
forums-3f9e9b581b8aad15ccfa01128c0dac8fd648e6ac.tar.bz2
forums-3f9e9b581b8aad15ccfa01128c0dac8fd648e6ac.tar.xz
forums-3f9e9b581b8aad15ccfa01128c0dac8fd648e6ac.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10170] Fix broken recaptcha verification host. [ticket/10170] Include www in hostname in language strings. [ticket/10170] Update language entries [ticket/10170] reCaptcha API has been moved.
Diffstat (limited to 'phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php')
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
index 12e3536893..c0db41d5a5 100644
--- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
@@ -27,9 +27,14 @@ if (!class_exists('phpbb_default_captcha', false))
*/
class phpbb_recaptcha extends phpbb_default_captcha
{
- var $recaptcha_server = 'http://api.recaptcha.net';
- var $recaptcha_server_secure = 'https://api-secure.recaptcha.net'; // class constants :(
- var $recaptcha_verify_server = 'api-verify.recaptcha.net';
+ var $recaptcha_server = 'http://www.google.com/recaptcha/api';
+ var $recaptcha_server_secure = 'https://www.google.com/recaptcha/api'; // class constants :(
+
+ // We are opening a socket to port 80 of this host and send
+ // the POST request asking for verification to the path specified here.
+ var $recaptcha_verify_server = 'www.google.com';
+ var $recaptcha_verify_path = '/recaptcha/api/verify';
+
var $challenge;
var $response;
@@ -296,7 +301,7 @@ class phpbb_recaptcha extends phpbb_default_captcha
return $user->lang['RECAPTCHA_INCORRECT'];
}
- $response = $this->_recaptcha_http_post($this->recaptcha_verify_server, '/verify',
+ $response = $this->_recaptcha_http_post($this->recaptcha_verify_server, $this->recaptcha_verify_path,
array(
'privatekey' => $config['recaptcha_privkey'],
'remoteip' => $user->ip,