WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: WP-OpenID] logins fail when using FORCE_SSL_ADMIN (3 posts)

  1. cpilking
    Member
    Posted 5 years ago #

    Using WP 2.6.2, WP-OpenID 2.2.2, OpenID logins do not work when define('FORCE_SSL_ADMIN', true); is present in wp-config.php.

    The login will bring you to the OpenID provider's page, collect credentials, and then return you to to the WordPress login page.

    When FORCE_SSL_ADMIN is commented out, WP-OpenID works as expected.

    Feel free to try the site, http://www.0x1.net/~cjp , FORCE_SSL_ADMIN is currently on, register permitted.

  2. cpilking
    Member
    Posted 5 years ago #

    Ok, I figured out a patch to logic.php, it works for me, but should be treated as alpha.

    The problem stems from the return_to being set based on get_option('home'). This may return a http:// URL, but when forcing ssl, we need to return to an https://.

    --- logic.php.orig  2008-08-07 04:52:08.000000000 -0400
    +++ logic.php   2008-09-27 03:09:35.000000000 -0400
    @@ -515,6 +515,9 @@
    
            // build return_to URL
            $return_to = trailingslashit(get_option('home'));
    +       if (force_ssl_admin() || force_ssl_login()) {
    +            $return_to = preg_replace('|^http://|', 'https://', $return_to);
    +        }
            $auth_request->return_to_args['openid_consumer'] = '1';
            $auth_request->return_to_args['action'] = $action;
            if (is_array($arguments) && !empty($arguments)) {

    Perhaps someone can do some more thorough testing and encorporate this into the next release.

  3. Will Norris
    Member
    Posted 5 years ago #

    this is fixed in v3.0, which will be released later today.

Topic Closed

This topic has been closed to new replies.

About this Topic