aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2010-01-17 17:25:14 +0000
committerChris Smith <toonarmy@phpbb.com>2010-01-17 17:25:14 +0000
commitaf6c5dd41d167a9402b7cc010caafcdee167bd10 (patch)
tree28c2c209439fd45d3e683dc606552bea7e3e5d12 /phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
parent2fd7cd661b35bf52f1433b4682f37d0641593859 (diff)
downloadforums-af6c5dd41d167a9402b7cc010caafcdee167bd10.tar
forums-af6c5dd41d167a9402b7cc010caafcdee167bd10.tar.gz
forums-af6c5dd41d167a9402b7cc010caafcdee167bd10.tar.bz2
forums-af6c5dd41d167a9402b7cc010caafcdee167bd10.tar.xz
forums-af6c5dd41d167a9402b7cc010caafcdee167bd10.zip
Load reCAPTCHA over https when using a secure connection to the board. #55755
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10420 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php')
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
index d4543dddfc..0f0bfc4156 100644
--- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
@@ -28,10 +28,17 @@ 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 $challenge;
var $response;
+ // PHP4 Constructor
+ function phpbb_recaptcha()
+ {
+ $this->recaptcha_server = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? $this->recaptcha_server_secure : $this->recaptcha_server;
+ }
+
function init($type)
{
global $config, $db, $user;