Page MenuHomePhabricator

Upload protection shown as an applicable restriction for non-existent files
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:
Has an option to upload protect the file. Attempting to upload protect the file result in a malformed log entry, and no actual protection. This is because WikiPage::doUpdateRestrictions strips the upload protection and only allows create protection for non-existent pages, but still creates the log entry, while RestrictionStore::listAllRestrictionTypes still returns upload protection as a restriction for non-existent titles.

What should have happened instead?:
No option to upload protect the file.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:

Event Timeline

Change 750808 had a related patch set uploaded (by Dylsss; author: Dylsss):

[mediawiki/core@master] RestrictionStore: Do not return upload as a restriction for non-existent titles

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

Change 750808 merged by jenkins-bot:

[mediawiki/core@master] RestrictionStore: Do not return upload as a restriction for non-existent titles

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