Page MenuHomePhabricator

Unable to change content model to javascript in mediawiki space
Open, MediumPublicSecurity

Description

Steps to reproduce:

  1. Create a page in wikitext in the mediawiki namespace (e.g. https://test.wikipedia.org/wiki/MediaWiki:CChangeTest )
  2. Use change content model to change the model from wikitext to javascript (see image)

image.png (852×458 px, 27 KB)

  1. FAIL (see image)

image.png (868×548 px, 33 KB)

What I expect to happen: elevated security prompt should engage, then the workflow should continue

Details

Risk Rating
Medium
Author Affiliation
Wikimedia Communities
Related Changes in Gerrit:

Event Timeline

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

Reported in WMF-Stewards meeting today.

Note: If I get elevated using a different workflow, then the change content model interface does work during my non-expired time.

SpecialChangeContentModel needs to override getLoginSecurityLevel() (and inject AuthManager) so that FormSpecialPage::execute() triggers reauthentication before the editsitejs permission check fails.

Same with Special:MovePage btw (and I assume Special:Undelete? no idea).

sbassett triaged this task as Medium priority.May 5 2026, 6:35 PM
sbassett changed Author Affiliation from N/A to Wikimedia Communities.
sbassett changed the visibility from "Custom Policy" to "Public (No Login Required)".
sbassett changed the edit policy from "Custom Policy" to "All Users".
sbassett changed Risk Rating from N/A to Medium.
sbassett moved this task from Incoming to Watching on the Security-Team board.

This will be somewhat improved next week with this patch, which includes a link to the reauthentication form in the error message. That's still not exactly what we want, and we'll keep working on more improvements, but it should be slightly better and slightly less confusing than the current situation,

This will be somewhat improved next week with this patch, which includes a link to the reauthentication form in the error message. That's still not exactly what we want, and we'll keep working on more improvements, but it should be slightly better and slightly less confusing than the current situation,

Please, at least make the link clickable.

image.png (1,027×306 px, 56 KB)

Change #1295944 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/WikimediaCustomizations@master] ForceReauth: Fix link in permission error

https://gerrit.wikimedia.org/r/1295944

Change #1295944 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCustomizations@master] ForceReauth: Fix link in permission error

https://gerrit.wikimedia.org/r/1295944