SSL link for Pro Upgrade admin bar button

Im getting insecure content issues from the Pro Upgrade button on the admin bar for logged in admins.

The link seems to be hard coded to http: even when browsing in https:

Please apply a patch for this asap as it stops my app being used in Facebook application iframes.

Ben

  • Jamin
    • Site Builder, Child of Zeus
    <li id="wp-admin-bar-pro-site">
     <a class="ab-item" href="http://like2unlock.customtabs.co.nz/pro-site/?bid=844">
      <span>Pro Upgrade</span>
     </a>
    </li>

    There is the snippet of the source code for the page which was browsing on HTTPS:

    And ofcourse the link included.

    Is this what you required?

  • Jamin
    • Site Builder, Child of Zeus

    In pro-sites.php lines 540 under checkout_url function.

    if ( apply_filters('psts_force_ssl', false) ) {
     $url = str_replace('http://', 'https://', $url);
    }

    Shouldn't this code detect if the user is currently browsing in SSL and change the link accordingly? seems silly to have to change it to force ssl in the settings.

    If the page is loaded in SSL then the link added to the admin bar should be SSL.

  • aristath
    • Recruit

    @Jamin

    Shouldn't this code detect if the user is currently browsing in SSL and change the link accordingly? seems silly to have to change it to force ssl in the settings.

    This function changes does NOT have the URL hard-coded.
    If uses the 'psts_force_ssl' filter to determine if it should be http or https.
    This filter is for example forced when using stripe and paypal in some cases.
    To force SSL on that page on your site you can add this on your theme's functions.php file:

    // This is a simple dummy function that returns true.
    function custom_dummy_return_true() {
      return true;
    }
    add_filter( 'psts_force_ssl', 'custom_dummy_return_true' );

    I hope that helps!

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.