[wp-trac] [WordPress Trac] #15928: wp_get_attachment_url does not check for HTTPS

WordPress Trac noreply at wordpress.org
Sat Nov 8 00:53:44 UTC 2014


#15928: wp_get_attachment_url does not check for HTTPS
--------------------------+-----------------------------
 Reporter:  atetlaw       |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  Future Release
Component:  Permalinks    |     Version:  3.0.3
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------

Comment (by azaozz):

 Replying to [comment:81 boonebgorges]:
 > The case of non-loading content seems just as bad as (or worse than) the
 mixed-content warnings we currently see in certain setups.

 Right. This is the reason this ticket is 4 years old...

 Ideally we should use protocol relative URLs when inserting local content
 in the editor. However there are so many places that check for `https?://`
 when looking for URLs that using only `//` would need extensive back-
 compat fixes. And even then some plugins would probably break.

 The alternative is to replace `https://local.domain` with `//local.domain`
 on the front end when the site is accessed through http. That would be yet
 another display filter and should run after everything else. This still
 could break plugins that use JS to look for images, etc. but will be more
 backwards compatible.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/15928#comment:82>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list