aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/captcha/plugins')
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php4
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php13
2 files changed, 11 insertions, 6 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
index 75fef25a9f..3bc727da41 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
@@ -319,7 +319,7 @@ class phpbb_captcha_qa
),
'PRIMARY_KEY' => 'question_id',
'KEYS' => array(
- 'lang_iso' => array('INDEX', 'lang_iso'),
+ 'lang' => array('INDEX', 'lang_iso'),
),
),
CAPTCHA_ANSWERS_TABLE => array (
@@ -328,7 +328,7 @@ class phpbb_captcha_qa
'answer_text' => array('STEXT_UNI', ''),
),
'KEYS' => array(
- 'question_id' => array('INDEX', 'question_id'),
+ 'qid' => array('INDEX', 'question_id'),
),
),
CAPTCHA_QA_CONFIRM_TABLE => array (
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,