Adding proper SSL checking, maybe?

This commit is contained in:
Tom Slominski
2013-12-29 18:30:08 +00:00
parent e3823abefb
commit 1e8eb9fe08

View File

@@ -108,7 +108,8 @@ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>"); die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
} }
if ($use_ssl) { if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'
|| $_SERVER['SERVER_PORT'] == 443) {
$server = RECAPTCHA_API_SECURE_SERVER; $server = RECAPTCHA_API_SECURE_SERVER;
} else { } else {
$server = RECAPTCHA_API_SERVER; $server = RECAPTCHA_API_SERVER;