#1 2014-09-24 10:20:17

Registered: 2014-08-08
Posts: 2

ReCaptcha on http/https - issue

When changing my site from http to https, the Recaptcha module didn't work anymore (no recaptcha image, nor input box).
This is because with https site, we need to use https for the google Recaptcha form (see https://developers.google.com/recaptcha/docs/tips?hl=en: "In order to avoid getting browser warnings when you use reCAPTCHA on an SSL site, you should replace http://www.google.com/recaptcha/api with https://www.google.com/recaptcha/api when you request a challenge.").

The ionize reCaptcha module uses per default $use_ssl=false.
See "function recaptcha_get_html ($error = null, $use_ssl = false)" in /modules/Recaptcha/libraries/Recaptcha.php

I solved the issue by overwriting the $use_ssl default in this recaptcha_get_html function:
$use_ssl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on');


What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.


Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations