aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-05-10 22:06:23 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-05-10 22:06:23 -0400
commitf670aefd3694ad0de804414e8d9880dfa1c920b3 (patch)
tree464839713e2a5c31cef504eb9db3ce82fa07a1b7
parent7faabfb532677caadfeee07158a8d14f2e4468e7 (diff)
parenteded608a53b3882a7a42bddf6b1c9f479c2b0304 (diff)
downloadforums-f670aefd3694ad0de804414e8d9880dfa1c920b3.tar
forums-f670aefd3694ad0de804414e8d9880dfa1c920b3.tar.gz
forums-f670aefd3694ad0de804414e8d9880dfa1c920b3.tar.bz2
forums-f670aefd3694ad0de804414e8d9880dfa1c920b3.tar.xz
forums-f670aefd3694ad0de804414e8d9880dfa1c920b3.zip
Merge remote-tracking branch 'bantu/ticket/10170' into develop-olympus
* bantu/ticket/10170: [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.
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php13
-rw-r--r--phpBB/language/en/captcha_recaptcha.php6
2 files changed, 12 insertions, 7 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
index ea171dbe2c..0b0270f568 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'))
*/
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,
diff --git a/phpBB/language/en/captcha_recaptcha.php b/phpBB/language/en/captcha_recaptcha.php
index 463bfffe0d..9b2fb2049d 100644
--- a/phpBB/language/en/captcha_recaptcha.php
+++ b/phpBB/language/en/captcha_recaptcha.php
@@ -37,14 +37,14 @@ if (empty($lang) || !is_array($lang))
$lang = array_merge($lang, array(
'RECAPTCHA_LANG' => 'en',
- 'RECAPTCHA_NOT_AVAILABLE' => 'In order to use reCaptcha, you must create an account on <a href="http://recaptcha.net">reCaptcha.net</a>.',
+ 'RECAPTCHA_NOT_AVAILABLE' => 'In order to use reCaptcha, you must create an account on <a href="http://www.google.com/recaptcha">www.google.com/recaptcha</a>.',
'CAPTCHA_RECAPTCHA' => 'reCaptcha',
'RECAPTCHA_INCORRECT' => 'The visual confirmation code you submitted was incorrect',
'RECAPTCHA_PUBLIC' => 'Public reCaptcha key',
- 'RECAPTCHA_PUBLIC_EXPLAIN' => 'Your public reCaptcha key. Keys can be obtained on <a href="http://recaptcha.net">reCaptcha.net</a>.',
+ 'RECAPTCHA_PUBLIC_EXPLAIN' => 'Your public reCaptcha key. Keys can be obtained on <a href="http://www.google.com/recaptcha">www.google.com/recaptcha</a>.',
'RECAPTCHA_PRIVATE' => 'Private reCaptcha key',
- 'RECAPTCHA_PRIVATE_EXPLAIN' => 'Your private reCaptcha key. Keys can be obtained on <a href="http://recaptcha.net">reCaptcha.net</a>.',
+ 'RECAPTCHA_PRIVATE_EXPLAIN' => 'Your private reCaptcha key. Keys can be obtained on <a href="http://www.google.com/recaptcha">www.google.com/recaptcha</a>.',
'RECAPTCHA_EXPLAIN' => 'In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.',
));