Add rate limiter to Special:ConfirmEmail
[lhc/web/wiklou.git] / includes / specials / SpecialEditTags.php
index 5203807..6ef6cb3 100644 (file)
@@ -68,8 +68,10 @@ class SpecialEditTags extends UnlistedSpecialPage {
                $request = $this->getRequest();
 
                // Check blocks
-               if ( $user->isBlocked() ) {
-                       throw new UserBlockedError( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       throw new UserBlockedError( $block );
                }
 
                $this->setHeaders();
@@ -225,6 +227,9 @@ class SpecialEditTags extends UnlistedSpecialPage {
                $list = $this->getList();
                for ( $list->reset(); $list->current(); $list->next() ) {
                        $item = $list->current();
+                       if ( !$item->canView() ) {
+                               throw new ErrorPageError( 'permissionserrors', 'tags-update-no-permission' );
+                       }
                        $numRevisions++;
                        $out->addHTML( $item->getHTML() );
                }