WordPress.org

Ready to get started?Download WordPress

Forums

Patch Request for SSL (5 posts)

  1. lordcore
    Member
    Posted 7 years ago #

    The get_option() function in /wp-includes/settings.php needs patching to correctly handle SSL connections. At current, the site will fetch the siteurl option from the db without modification, therefore making all permalinks and page links start with whatever the value of siteurl is (usually containing the http:// prefix).

    The return statement of get_option() should be changed from:
    return apply_filters( 'option_' . $setting, maybe_unserialize($value) );

    to:

    if($_SERVER['HTTPS'] == '') {
    return apply_filters( 'option_' . $setting, maybe_unserialize($value) );
    } else {
    return str_replace('http://', 'https://', apply_filters( 'option_' . $setting, maybe_unserialize($value) ));
    }
  2. lordcore
    Member
    Posted 7 years ago #

    Apologies for the sort-of-double-post. Accidentaly closed the tab half way through sending the post. Evidently only half of the request went through.

  3. flyingkites
    Member
    Posted 6 years ago #

    I could not find a wp-includes/settings.php in WP 2.2.2?

    And I need to find out how to handle the issue of secure/inseucre warnings on an SSL page ...

  4. flyingkites
    Member
    Posted 6 years ago #

    lordcore are you around?

    Can anyone tell which program in 2.2.1 corresponds to what he has posted above?

  5. flyingkites
    Member
    Posted 6 years ago #

    okay so it is not /wp-includes/settings.php but just settings.php

    but there is no code such as that mentioned.

Topic Closed

This topic has been closed to new replies.

About this Topic