Page MenuHomePhabricator

Display warning when $wgServer's protocol does not match site setup
Open, LowPublic

Description

Per T173004, when a site is served via https, having an http URL as $wgServer is going to break MediaViewer in a subtle way.
This is probably due to an initial http site setup that has been migrated to https (relatively common these days).
It would be nice if the server could detect this mismatch in the MediaWiki setup and warn the user/administrator.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Having a site that's accessible via HTTPS but has http: in $wgServer is a misconfiguration and will break all kinds of things in not particularly subtle ways (all CSS/JS loading for example). If you want to serve both HTTP and HTTPS, you should use a protocol-relative $wgServer URL. Maybe MediaWiki should warn about this (how?) but there is nothing MediaViewer-specific to it.

I'm happy for the tag to go and to clarify the description. If this can be "fixed" with a MediaWiki-level warning I'd be even happier.
However I must report that the wiki site I run has been happily running misconfigured with no reports of malfunction for months. It's a simple but not trivial site, we have around 15 extensions. Clicking on embedded images is a seldom used functionality and we had not noticed other issues before I saw that one. And it sounds like someone else had the same issue before me... (Thanks for solving that by the way!)

Aklapper triaged this task as Low priority.Jul 14 2022, 9:51 AM