Currently most Wikimedia wikis use protocol-relative URLs in $wgServer, which means that wfExpandUrl with PROTO_RELATIVE will expand to a protocol-relative URL. That does not help Wikimedia Foundation wikis, since we don't actually use HTTP in any URLs anymore.
When third parties use an HTML snippet from a MediaWiki API that uses PROTO_RELATIVE (which is arguably the most correct choice for our API), and displayed that on a third-party site over plain HTTP, this will also connect to us over HTTP (exposing users to MITM), and incur a performance hit (because of the extra redirect).
Use cases
Outline
- Audit usage of mw.config wgServer in JavaScript pages on Wikimedia wikis
- Invite Wikitech ambassadors via Tech News to address hardcoded assumptions based on results in Global Search link at T118413#10973765.
- Fix remaining prominent gadgets to migrate hardcoded assumptions about protocol-relativity, as outlined above.
- Triage remaining results to look for new use cases that we don't have a solution for yet, and report them on this task.
- Address those new use cases, if any.
- Switch WMF wgServer to https.