MediaWiki supports a "mixed mode" where the wiki can be accessed either via HTTP or HTTPS, with a lot of code complexity trying to make it possible to browse the site in HTTP but use HTTPS during login:
The web has moved on in the decade or so since these features were added; all serious sites are HTTPS-only now. We want to support HTTP-only sites forever because it makes CI and local development much simpler, but there isn't much need for mixed mode, and certainly not jumping through hoops to have the login and rest of the browsing in different protocols (which offers very little added security - session cookies can still be stolen, so at most it protects other websites if the user reuses passwords between sites; and even then, once the cookies are stolen, orchestrating a phishing attack for the password isn't too hard).
This would involve deprecating and eventually removing at least the following settings/features:
- $wgSecureLogin
- prefershttps user preference and User::requiresHTTPS()
- Session::shouldForceHTTPS() / SessionInfo::forceHTTPS() and the forceHTTPS cookie
- the forceHTTPS / wpForceHttps and fromhttp / wpFromhttp URL flags for juggling protocols during login
- the "Use secure connection" link during login
and maybe replacing $wgCookieSecure with $wgForceHTTPS.
Inspired by rMWca650329eed1: Use Codex icon and color for sign with secure link. See T256095: Stop sending the forceHTTPS cookie, make the HTTPS redirect unconditional for the previous round of HTTP deprecations.