[wp-trac] [WordPress Trac] #34945: HTTPS website with HTTP images
WordPress Trac
noreply at wordpress.org
Thu Mar 10 03:05:35 UTC 2016
#34945: HTTPS website with HTTP images
-------------------------------------------------+-------------------------
Reporter: Angristan | Owner:
Type: defect (bug) | johnbillion
Priority: normal | Status: reopened
Component: Media | Milestone: 4.5
Severity: normal | Version: 4.4
Keywords: https has-patch has-unit-tests | Resolution:
commit | Focuses:
-------------------------------------------------+-------------------------
Comment (by jeremyfelt):
[attachment:34945.5.diff] reverses one of the assertions made in #15928 -
that `wp_get_attachment_url()` should **not** force HTTPS when
administering over HTTPS but `siteurl` is HTTP. I think this assertion
needs to happen in `get_image_tag()` or similar so that we can reverse a
previous HTTPS decision if need be.
I'm not confident with the logic, but it's a first stab:
* If the image (via `wp_get_attachment_url()`) is HTTPS
* And the `siteurl` is HTTP
* And the image host matches the `siteurl` host
* Then convert to HTTP
I'm least confident about whether we should only do this when the image
host and `siteurl` host match.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34945#comment:49>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list