From af6c5dd41d167a9402b7cc010caafcdee167bd10 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sun, 17 Jan 2010 17:25:14 +0000 Subject: [PATCH] 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 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 4df893e1dc..f90e1e84f3 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -134,6 +134,7 @@
  • [Fix] Correctly determine permissions to show quick reply button. (Bug #56555)
  • [Fix] Do not unsubscribe users from topics replying with quickreply. (Bug #56235)
  • [Fix] Don't submit when pressing enter on preview button. (Bug #54395)
  • +
  • [Fix] Load reCAPTCHA over https when using a secure connection to the board. (Bug #55755)
  • [Change] Move redirect into a hidden field to avoid issues with mod_security. (Bug #54145)
  • [Change] Log activation through inactive users ACP. (Bug #30145)
  • [Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)
  • 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;