mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-28 16:00:28 +00:00
Check tags with ChangeTags::canCreateTag
These are also user-provided tag names, so should be checked with ChangeTags::canCreateTag, which is intended for that purpose. This check also applies on edits. Bug: T164133 Change-Id: Iaf161d538f225a86c7abf8a8a347de9169d781bf
This commit is contained in:
parent
0aaae3eec3
commit
5e2e4849b3
|
@ -111,7 +111,9 @@ class AbuseFilterViewEdit extends AbuseFilterView {
|
|||
$bad = false;
|
||||
foreach ( $actions['tag']['parameters'] as $tag ) {
|
||||
$t = Title::makeTitleSafe( NS_MEDIAWIKI, 'tag-' . $tag );
|
||||
if ( !$t ) {
|
||||
if ( !$t ||
|
||||
!ChangeTags::canCreateTag( $tag, $user )->isOK() ) {
|
||||
|
||||
$bad = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue