Skip to content

Commit

Permalink
Merge remote-tracking branch 'bantu/ticket/10170' into develop-olympus
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
p committed May 11, 2011
2 parents 7faabfb + eded608 commit f670aef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@
*/
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;

Expand Down Expand Up @@ -296,7 +301,7 @@ function recaptcha_check_answer($extra_params = array())
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,
Expand Down
6 changes: 3 additions & 3 deletions phpBB/language/en/captcha_recaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@

$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.',
));
Expand Down

0 comments on commit f670aef

Please sign in to comment.