Page MenuHomePhabricator

Global method wfWikiID() creates a non-alphanumeric id preventing file upload
Closed, DuplicatePublic

Description

I was not able to upload files to my wiki installation:

Unable to create the folder "mwstore://local-backend/local-public/f/fc"

I found out that the wfWikiID() method was generating a non-alphanumeric id. The isValidContainerName method defined in FileBackendStore did not validate the resulting non-alphanumeric container name which prevented every file from being uploaded.

The global wfWikiID() method creates ids by simply combining the database name and prefix.

My database name contains a dot ".".

Event Timeline

ffraenz created this task.Nov 28 2015, 3:04 PM
ffraenz raised the priority of this task from to Needs Triage.
ffraenz updated the task description. (Show Details)
ffraenz added a project: MediaWiki-General.
ffraenz added a subscriber: ffraenz.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptNov 28 2015, 3:04 PM
ffraenz renamed this task from wfWikiID() creates a non-alphanumeric id to Global method wfWikiID() creates a non-alphanumeric id.Nov 28 2015, 3:07 PM
ffraenz updated the task description. (Show Details)
ffraenz set Security to None.

Can you provide the error message you got when uploading, if there was any? It would help people facing the same problem if they search the error message and find the cause here

ffraenz updated the task description. (Show Details)Nov 28 2015, 3:19 PM
ffraenz renamed this task from Global method wfWikiID() creates a non-alphanumeric id to Global method wfWikiID() creates a non-alphanumeric id preventing file upload.Nov 29 2015, 12:21 PM
Tgr added a subscriber: Tgr.Dec 2 2015, 7:14 PM

This was fixed in T46066. Probably needs a backport?