mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Duplicate check for array_diff
Currently, array_diff is only performed in one direction. This way, some edits to tags (and, in future, to custom block durations) aren't catched and the filter isn't saved. Bug: T180194 Change-Id: I22fb9368208380c1a8205a566ac5ff07bbb6e05b
This commit is contained in:
parent
d138b2877c
commit
603b020239
|
@ -2069,8 +2069,11 @@ class AbuseFilter {
|
|||
// They're both unset
|
||||
} elseif ( isset( $actions1[$action] ) && isset( $actions2[$action] ) ) {
|
||||
// They're both set.
|
||||
// Double check needed, e.g. per T180194
|
||||
if ( array_diff( $actions1[$action]['parameters'],
|
||||
$actions2[$action]['parameters'] ) ) {
|
||||
$actions2[$action]['parameters'] ) ||
|
||||
array_diff( $actions2[$action]['parameters'],
|
||||
$actions1[$action]['parameters'] ) ) {
|
||||
// Different parameters
|
||||
$differences[] = 'actions';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue