SECURITY: Add permission check for user is permitted to view the log type
[lhc/web/wiklou.git] / includes / specials / SpecialEditTags.php
index 60d5fd7..d11cf64 100644 (file)
@@ -225,6 +225,9 @@ class SpecialEditTags extends UnlistedSpecialPage {
                // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                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() );
                }