mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-13 17:27:20 +00:00
b7cda4de4c
Previously, the cached value would depend on the tags parameter to be updated. The provided value may be different for each call, so callers may receive unexpected values. For example, while core usually calls this with core-defined hooks, our method AbuseFilter::isAllowedTag calls this providing an empty array. If core's call happened shortly after ours and hit cache, its array would be overwritten with only AbuseFilter's tags, the rest would be lost. Also do some clean up: - only call array_filter on explode'd array - call array_unique on the value, since it's usual that multiple filters share the same tag Noticed when thinking about moving this to a service. Change-Id: I4f4322e80ec89e48458a3bf46a1146863bec8237 |
||
---|---|---|
.phan | ||
db_patches | ||
i18n | ||
includes | ||
maintenance | ||
modules | ||
tests | ||
.eslintrc.json | ||
.gitignore | ||
.gitreview | ||
.phpcs.xml | ||
.stylelintrc.json | ||
AbuseFilter.alias.php | ||
abusefilter.tables.pg.sql | ||
abusefilter.tables.sql | ||
abusefilter.tables.sqlite.sql | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
COPYING | ||
extension.json | ||
Gruntfile.js | ||
hooks.txt | ||
package-lock.json | ||
package.json |