summaryrefslogtreecommitdiff
path: root/plugins/Recaptcha
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-06-24 15:21:04 +0000
committerBrion Vibber <brion@pobox.com>2010-06-24 15:21:04 +0000
commita6408be566dc9877eb67c86d4283dd57b2255d8b (patch)
treec6b9330fabd7a52a554d63d76d103e2fdb1319b4 /plugins/Recaptcha
parent1eec7f779fc85b530907ea31deceadb2a30d7614 (diff)
Regression fix for Recaptcha on SSL registration page; their API is served on a different hostname for SSL.
Diffstat (limited to 'plugins/Recaptcha')
-rw-r--r--plugins/Recaptcha/RecaptchaPlugin.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/Recaptcha/RecaptchaPlugin.php b/plugins/Recaptcha/RecaptchaPlugin.php
index f09d81ec0..7cc34c568 100644
--- a/plugins/Recaptcha/RecaptchaPlugin.php
+++ b/plugins/Recaptcha/RecaptchaPlugin.php
@@ -77,8 +77,11 @@ class RecaptchaPlugin extends Plugin
{
if (isset($action->recaptchaPluginNeedsOutput) && $action->recaptchaPluginNeedsOutput) {
// Load the AJAX API
- $proto = $this->checkssl() ? 'https' : 'http';
- $url = "$proto://api.recaptcha.net/js/recaptcha_ajax.js";
+ if ($this->checkssl()) {
+ $url = "https://api-secure.recaptcha.net/js/recaptcha_ajax.js";
+ } else {
+ $url = "http://api.recaptcha.net/js/recaptcha_ajax.js";
+ }
$action->script($url);
// And when we're ready, fill out the captcha!