Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F28838873
T222036.patch
Rxy (rxy)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Rxy
Apr 28 2019, 8:11 PM
2019-04-28 20:11:31 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
T222036.patch
View Options
From de1aa0099374c59f2a228d0d469f96e31738741c Mon Sep 17 00:00:00 2001
From: rxy <wikitech.rxy@rxy.jp>
Date: Mon, 29 Apr 2019 05:04:01 +0900
Subject: [PATCH] Add permission check for user is permitted to view the log
type
Bug: T222036
Change-Id: I7584ee8db23a8834bbab21e355cab9857a293f72
---
includes/changetags/ChangeTagsLogItem.php | 2 +-
includes/specials/SpecialEditTags.php | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/includes/changetags/ChangeTagsLogItem.php b/includes/changetags/ChangeTagsLogItem.php
index 75b713ef0d..2bac909716 100644
--- a/includes/changetags/ChangeTagsLogItem.php
+++ b/includes/changetags/ChangeTagsLogItem.php
@@ -49,7 +49,7 @@ class ChangeTagsLogItem extends RevisionItemBase {
}
public function canView() {
- return LogEventsList::userCan( $this->row, Revision::DELETED_RESTRICTED, $this->list->getUser() );
+ return LogEventsList::userCan( $this->row, Revision::SUPPRESSED_ALL, $this->list->getUser() );
}
public function canViewContent() {
diff --git a/includes/specials/SpecialEditTags.php b/includes/specials/SpecialEditTags.php
index 520380763f..109da546c2 100644
--- a/includes/specials/SpecialEditTags.php
+++ b/includes/specials/SpecialEditTags.php
@@ -225,6 +225,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() );
}
--
2.11.0
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7373316
Default Alt Text
T222036.patch (1 KB)
Attached To
Mode
T239494: Requesting access to LogStash for rxy
Attached
Detach File
T222038: Exposed suppressed log in RevisionDelete page
Attached
Detach File
T222036: Exposed suppressed username or log in Special:EditTags
Attached
Detach File
Event Timeline
Log In to Comment