Page MenuHomeMiraheze

It is possible for ManageWiki's toggleExtension.php script to enable extensions even if given --disable
Closed, ResolvedPublic

Description

Title. This was observed while undeploying the Graph extension in T12119: Sunset & Remove Graph.

During the undeployment, the steps at Tech:Removing an extension were followed.

The database list was generated with sudo -u www-data php /srv/mediawiki/1.41/extensions/MirahezeMagic/maintenance/generateExtensionDatabaseList.php --wiki=loginwiki --extension=graph --directory=/srv/mediawiki

Then the extension was being disabled on all wikis on that dblist with sudo -u www-data /usr/local/bin/foreachwikiindblist /srv/mediawiki/graph.json /srv/mediawiki/1.41/extensions/ManageWiki/maintenance/toggleExtension.php --disable graph

I noticed that in some wikis, if not most of them, the extension was being enabled by the script. One such wiki was snowballaspediawiki. I then tested it by running toggleExtension.php on that wiki, first disabling it, after it was enabled by the script before (https://meta.miraheze.org/wiki/Tech:Server_admin_log?diff=prev&oldid=403137), then enabling it by running it again (https://meta.miraheze.org/wiki/Tech:Server_admin_log?diff=prev&oldid=403138).

It should never ever attempt to enable an extension when given --disable