[Pushed] reCaptcha not work if use SSL (HTTPS)
#1
reCaptcha not work if use SSL (HTTPS)

Solution:
in line 141 of class_captcha.php
			$this->server = "http://www.google.com/recaptcha/api";
			$this->secure_server = "https://www.google.com/recaptcha/api";

should be:
			$this->server = "//www.google.com/recaptcha/api";
			$this->secure_server = "//www.google.com/recaptcha/api";
Reply
#2
Confirmed
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#3
Your change would work, however it makes the secure_server variable useless. You'd also need to remove it and replace it with server instead.
Support PMs will be ignored!
Reply
#4
(2014-10-14, 08:11 AM)Jones H Wrote: Your change would work, however it makes the secure_server variable useless. You'd also need to remove it and replace it with server instead.

IMO that would be the best solution. 
Reply
#5
There was an issue about this on RedMine and Stefan decided to fix it with the secure_server variable instead of removing the protocol. I'm not 100% sure why, however we can't access RedMine atm.
Support PMs will be ignored!
Reply
#6
I can testify that that it is not an issue with mybb. As my recaptcha is working just fine. May be your configs?
Reply
#7
This issue for CloudFlare (because your host isn't secure And you use CloudFlare SSL)
For fix, you can change line 193:
		if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
to
		if((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'))
Reply
#8
(2014-10-21, 01:00 PM)My-BB.Ir Wrote: This issue for CloudFlare (because your host isn't secure And you use CloudFlare SSL)
For fix, you can change line 193:
		if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
to
		if((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'))

thanks for information...
i will move to new VPS, so after this i will install SSL in my VPS... i think better...
Reply
#9
@My-BB.Ir i tried your solution, but not work for me...

and anime-forum.info i used Full SSL mode (cloudflare)

Quote:Full SSL  --  SSL between the visitor and CloudFlare -- visitor sees HTTPS on your site, and SSL between CloudFlare and your web server. You'll need to have your own SSL cert or self-signed cert at the very least.

[Image: 5d4O8km.png]

But problem persist...
Reply
#10
for me best solution to user that use Cloudflare SSL is use https in both:

$this->server = "https://www.google.com/recaptcha/api";
$this->secure_server = "https://www.google.com/recaptcha/api";

and for me i don´t know why not use only https in recaptcha
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)