Allow blocked sysops to view Special:Unblock
authorAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 20 Jul 2011 02:34:25 +0000 (02:34 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 20 Jul 2011 02:34:25 +0000 (02:34 +0000)
commitf1210bf4e73aa0553ff29be83e0d3ab445a9b347
treeb655329927beac26014ecd9c268c850b5df4aaa1
parent2423be67b0f337410d8c10cdfbfa34bc22657ad4
Allow blocked sysops to view Special:Unblock

Previously, trying to visit [[Special:Unblock]] while blocked would give
an error, even if the user has the unblockself permission.  I moved the
permission check from execute() to right before the code that does the
actual unblocking.  This should probably be examined closely for
security, since I'm not familiar with this code, although the impact of
a bug would be small.  I tested some simple cases manually and they all
worked as expected:

* Unblocking self works (as before)
* Submitting the form fails unless you're trying to unblock yourself (as
  before)
* GETting the page with any parameters works (previously failed unless
  the target was your own username)
includes/specials/SpecialUnblock.php