[wp-trac] [WordPress Trac] #25449: wp_upload_dir() doesn't support https

WordPress Trac noreply at wordpress.org
Tue Mar 8 03:16:07 UTC 2016


#25449: wp_upload_dir() doesn't support https
-------------------------------------------+-----------------------------
 Reporter:  ryanhellyer                    |       Owner:
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  Future Release
Component:  Upload                         |     Version:  3.8
 Severity:  major                          |  Resolution:
 Keywords:  needs-testing https has-patch  |     Focuses:
-------------------------------------------+-----------------------------

Comment (by joemcgill):

 Thanks @thomaswm. This is almost exactly what I had in mind. A couple of
 notes:

 1. If we go this route, the scheme checks should probably be moved to
 `_wp_upload_dir()` and be applied to the `$baseurl` variable so that the
 scheme is set before the `upload_dir` filter is applied. As is, it looks
 like your patch would fail since the `$uploads` variable isn't set until
 after your code.

 2. In `get_image_tag()` we should check for the scheme of the
 `upload_url_path` option, the `WP_CONTENT_URL` constant, and then the
 `siteurl` option instead of the `home` option, since those are what is
 being used by `wp_upload_dir()` when building URLs now.

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


More information about the wp-trac mailing list