Opened 13 months ago

Last modified 6 days ago

#20534 new defect (bug)

Featured Image (Post Thumbnail) SSL Issue

Reported by: justindgivens Owned by:
Priority: normal Milestone: Awaiting Review
Component: Post Thumbnails Version: 2.9
Severity: normal Keywords: needs-testing has-patch
Cc: dennen@…, mike@…

Description

If the wp-config FORCE_SSL_ADMIN constant has been set to true then the Featured Image within the Edit Post page will still load without HTTPS. This isn't a huge deal but it breaks the SSL on the page. Patch fixes this.

Attachments (4)

20534.diff (696 bytes) - added by justindgivens 13 months ago.
Patch for 20534
20534.2.diff (896 bytes) - added by justindgivens 13 months ago.
Better fix instead of just for the post thumbnail. This fixes the Media and Media Edit pages as well.
20534.3.diff (913 bytes) - added by justindgivens 12 months ago.
Updated with the new function.
20534.4.diff (1006 bytes) - added by justindgivens 3 months ago.
Updated from last comments.

Download all attachments as: .zip

Change History (11)

Patch for 20534

  • Severity changed from minor to normal
  • Version changed from 3.3.1 to 3.4

Can we get this included in 3.4?

Better fix instead of just for the post thumbnail. This fixes the Media and Media Edit pages as well.

  • Version changed from 3.4 to 2.9

We now have set_url_scheme() we can use here.

Updated with the new function.

  • Cc dennen@… added

Might this be considered for 3.5 or beyond?

Ran into this today – code works great, thanks! Sad I couldn't have contributed, ya'll are too fast ;]

Hi,
I ran into this problem with wordpress 3.4.2 today and manually patched it using the attached fix.
I also noticed that there's a bug in the latest fix: http://core.trac.wordpress.org/attachment/ticket/20534/20534.3.diff

The following if statement should have brackets:

        if ( $src && $width && $height ) 
                        if( is_admin() ) 
                                $src = set_url_scheme( $src, 'admin' ); 
                        else 
                                $src = set_url_scheme( $src ); 
                        return array( $src, $width, $height ); 
                return false; 
        } 

Like so:

                if ( $src && $width && $height ) {
                        if( is_admin() ) 
                                $src = set_url_scheme( $src, 'admin' ); 
                        else 
                                $src = set_url_scheme( $src ); 
                        return array( $src, $width, $height ); 
                }
                return false; 
        } 

Updated from last comments.

comment:7   here6 days ago

  • Cc mike@… added
Note: See TracTickets for help on using tickets.