[wp-trac] [WordPress Trac] #15928: wp_get_attachment_url does not check for HTTPS
WordPress Trac
wp-trac at lists.automattic.com
Tue Dec 21 00:19:48 UTC 2010
#15928: wp_get_attachment_url does not check for HTTPS
--------------------------+-----------------------------
Reporter: atetlaw | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Permalinks | Version: 3.0.3
Severity: normal | Keywords:
--------------------------+-----------------------------
wp_get_attachment_url, via wp_upload_dir, uses get_option('siteurl') to
construct attachment URLs. If you're viewing your blog via HTTPS, the
attachment URLs will all use HTTP. leading to mixed secure/non-secure
content problems.
the_permalink function handles this nicely, by calling get_permalink, then
home_url, then get_home_url; get_home_url does an is_ssl check and
changes the scheme accordingly.
The wp_upload_dir function should probably be changed, so that instead of
calling get_option('siteurl') directly, it uses something like
get_home_url (or even get_site_url) which check for HTTPS.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15928>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list