Page MenuHomePhabricator

$wgUploadMaintenance is ignored during file uploads
Open, Needs TriagePublic

Description

When $wgUploadMaintenance is set to true, it should prevent any modifications from the upload repository: uploads (and reuploads), deletions, file renames.

Upon deletion it correctly displays an error stating the repo is in maintenance mode. However, the upload form doesn't give any warning, and uploading a file actually succeeds.

https://www.mediawiki.org/wiki/Manual:$wgUploadMaintenance

Reproduced on MediaWiki 1.30

Event Timeline

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

Okay, I read from the documentation that this setting is "To disable file delete/restore temporarily. " This makes the variable useless.

I don't see a point in allowing uploads while denying deletes/restores, specially since the later usually requires more specific permissions.

From r56215: Note that $wgEnableUploads really should be disabled too or it'll be a bit silly. ;)

I'd expect a centralized way to set uploads to readonly

FileBackend seems to have a ReadOnlyReason[1], but I'm not able to see how to set up easily

[1] https://doc.wikimedia.org/mediawiki-core/master/php/classFileBackend.html#a5619b7f33c83cfe570aacbfad814aea4

Vvjjkkii renamed this task from $wgUploadMaintenance is ignored during file uploads to auaaaaaaaa.Jul 1 2018, 1:03 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from auaaaaaaaa to $wgUploadMaintenance is ignored during file uploads.Jul 2 2018, 5:02 AM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.