SECURITY: Do not allow users to undelete a page they can't edit or create
authorBrian Wolff <bawolff+wn@gmail.com>
Mon, 13 Jun 2016 07:07:48 +0000 (03:07 -0400)
committerChad Horohoe <chadh@wikimedia.org>
Thu, 6 Apr 2017 20:44:55 +0000 (13:44 -0700)
commit55035e01e591b7bba373267e3ea5f0c0dad9b949
treecf7d8476f3777e5d79bc66adb85f96c9cf1ad888
parent17e7bc02357e42a78cf5fdcbf9e550dda4631ac6
SECURITY: Do not allow users to undelete a page they can't edit or create

If the page exists, it only checks edit rights, otherwise it
checks both edit and create rights.

This would only matter on wikis that have a non-default rights
configuration where there are users with undelete rights but a
restriction level enabled that prevents them from creating/editing
pages (or they otherwise aren't allowed to edit/create)

It should be noted that the error messages aren't used in the
normal UI currently, but they could be in the future, and
extensions could potentially be using them (The backend functions
return them, but the UI functions in Special:Undelete ignore
them)

Bug: T108138
Change-Id: I164b80534cf89e0afca264e9de07431484af8508
RELEASE-NOTES-1.29
includes/Title.php
includes/api/ApiUndelete.php
languages/i18n/en.json
languages/i18n/qqq.json