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

WordPress Trac noreply at wordpress.org
Mon Nov 24 13:05:43 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 4.2-early  |     Focuses:
-----------------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:  needs-patch => needs-patch 4.2-early


Comment:

 It looks like you correctly interpreted my intention but fixed my code in
 11.patch. Thanks :)

 > I'm not entirely sure how I would test for cases where they don't match,
 so I've left that alone.

 Let's get a test that looks something like this: just before calling
 `wp_get_attachment_url()`, filter 'upload_dir' and replace the baseurl and
 url with a different, non-SSL URL. Then, turn HTTPS on. Then assert that
 the generated attachment URL is *not* set to HTTPS.

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


More information about the wp-trac mailing list