MediaFire onebox uses insecure image

AI-generated summary

In a support discussion titled ‘MediaFire onebox uses insecure image,’ jomaxro reports that a MediaFire link triggers a mixed content warning because the onebox embeds an insecure (HTTP) image. Referencing an older topic, they hope for a resolution. codinghorror clarifies this isn’t a bug per se — it’s expected behavior when hotlinking HTTP images — and suggests the only real fix is blocking all HTTP content. Lutz agrees it’s not a bug but proposes a feature: warn users when attempting to onebox HTTP content, e.g., ‘This is not allowed here for security reasons,’ without requiring server-level (nginx) changes. In response, codinghorror notes the issue may already be resolved: oneboxes now download remote images, converting them to HTTPS if the Discourse site uses HTTPS. This change likely mitigates mixed content warnings by serving images from the local HTTPS context rather than directly from the HTTP source. The discussion reflects ongoing efforts to balance usability with security in Discourse’s onebox system, particularly regarding mixed content handling on HTTPS sites.

Going through some posts on Stonehearth, I discovered a page with a mixed content warning. I went ahead and changed the link from http to https, but it seems that the onebox is including an insecure image. I saw a topic from 2 years ago that’s seemed similar (old topic). I’m hoping that if this is the same issue there might now be a solution.

Here’s the link causing the issue:
https://www.mediafire.com/file/1ntykblml3x818v/magical_jobs.smod

How is this a bug? That’s gonna happen any time someone hotlinks an image from a http source. There’s no real solution, other than disallowing all http content.

Not even I see this as a bug :wink:

But, is it possible to disable https linking without nginx magic?

It would be a nice feature for security reasons. E.g. The user could get a warning when he try to onebox http content: “This is not allowed here for security reasons”.

I think this is resolved now because the oneboxes will download the remote image, thus converting them to https if the discourse site itself is https.