WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: SI CAPTCHA Anti-Spam] respecting FORCE_SSL_ADMIN (6 posts)

  1. Steve Taylor
    Member
    Posted 4 years ago #

    I'm using SI CAPTCHA on a site where FORCE_SSL_ADMIN is set to "true" in wp-config.php. This means the register form is over SSL, too - but all the links for images and so on that SI CAPTCHA generates stay as HTTP. This means that if someone says "No" to "Display non-secure items?", the captcha is broken.

    Is there anything I need to do to make SI CAPTCHA respect the FORCE_SSL_ADMIN setting? If it's currently not possible, I'm going to have to hack it - Mike, I'll send you the code for potential inclusion?

    http://wordpress.org/extend/plugins/si-captcha-for-wordpress/

  2. Mike Challis
    Member
    Posted 4 years ago #

    Do you have an example of another plugin that works with FORCE_SSL_ADMIN.
    I can look at how they implemented it and possibly fix it.

  3. Steve Taylor
    Member
    Posted 4 years ago #

    Apologies, my fault. It was down to me using the tip here that defines the WP URLs in wp-config.php. These definitions didn't respect SSL, and they were propagating through.

    For anyone else with the same issue, I imagine not using the above wp-config.php code will leave the WP URLs to WP itself, which I imagine does adjust to SSL. Or, use this code in wp-config.php:

    define( 'WP_HOME', ( $_SERVER['HTTPS']=='on' ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] );
    define( 'WP_SITEURL', ( $_SERVER['HTTPS']=='on' ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] );
  4. Mike Challis
    Member
    Posted 4 years ago #

    Should be fixed in today's new version. Adding extra code in wp-config.php is not needed for this.

    == Changelog ==

    = 2.2.6 =
    - (16 Dec 2009) - Added SSL compatibility.

  5. Steve Taylor
    Member
    Posted 4 years ago #

    So you've added code to double-check within SI CAPTCHA, and apply HTTPS where necessary internally? Obviously getting the global setting right is good, but thanks for adding that quickly, it'll help loads of sites.

  6. Mike Challis
    Member
    Posted 4 years ago #

    The code in SI CAPTCHA fixes the captcha image SSL problem.

    Sorry if I misled...
    when I said "Adding extra code in wp-config.php is not needed" I was only referring to the plugin capability of handling SSL for the captcha.

Topic Closed

This topic has been closed to new replies.

About this Topic