I think the logic around this https://github.com/wikimedia/mediawiki/blob/b4b84bb5f5a899d4d7e8fdc981fa0288e8757d1e/includes/specialpage/LoginSignupSpecialPage.php#L365-L370 and https://github.com/wikimedia/mediawiki/blob/b4b84bb5f5a899d4d7e8fdc981fa0288e8757d1e/includes/specialpage/LoginSignupSpecialPage.php#L845-L850 which produce
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:
{F57271379}
are just archaic on todays webThe 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, wikimedia is always using https,so at most it protects other websites if the user reuses passwords between sites; a good percentage of website are either always https or ifand even they don't have httpsn, they are http only I thinkonce the cookies are stolen, leaving this bit not really making that sense like the way it used to once (from the time we had dedicated HTTPS domain and so...orchestrating a phishing attack for the password isn't too hard).
Discovered this when seeing icon-lock.png asset in MediaWiki which I tried to get rid no matter of the decision we have here, https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1062376This 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`.
See also: https://www.jefftk.com/p/history-of-https-usageInspired by {ca650329eed1a431efc3a287dbe2a3014625cb31}. See {T256095} for the previous round of HTTP deprecations.