Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: StarredSkies on August 26, 2020, 01:03:14 PM

Title: Mixed Content Images
Post by: StarredSkies on August 26, 2020, 01:03:14 PM
My site has been converted to HTTP using steps from this guide (https://www.simplemachines.org/community/index.php?topic=555034.0), along with forcing it through CPanel. Recently we've been getting unsecured pages due to HTTP links from outside source images. This includes [img] codes, avatars, and images within the Post Template modification.

When converting these links to HTTPS within the post or reuploading them, the page goes back to being certified and secure. Nevertheless, this cannot be done by hand for every single HTTP image on site.

What can be done to ensure all of these mixed content links/images can automatically redirect to HTTPS? Any help would be appreciated. <3
Title: Re: Mixed Content Images
Post by: shawnb61 on August 26, 2020, 01:13:12 PM
That's what the image proxy is for.  Try enabling it! 
Title: Re: Mixed Content Images
Post by: StarredSkies on August 26, 2020, 02:04:31 PM
Correct me if I'm wrong, but hasn't there been issues with enabling the image proxy for already existing sites? Alternatively, disabling it too? That's why I am hesitant to do it... plus, I had no issues prior to today without it.
Title: Re: Mixed Content Images
Post by: Kindred on August 27, 2020, 10:25:17 AM
well, it is specifically what the proxy was intended for... and 2.0.17 should have corrected the issues with the proxy in 2.0.16

however...
1- img tags...   you can force https by doing a replace SQL statement directly in the body column of the smf_messages table.
replace [img]http: with [img]https:

2- avatars -- you could do the same thing in the database

the problem with both 1 and 2 is that you don't know for sure that the site with those images actually IS https...

regarding 3 -- you'd have to correct the original mod pho/html in the code...