mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-15 02:03:53 +00:00
SECURITY: Avoid deleted usernames leak in page_recent_contributors
Bug: T71367 Change-Id: I8d5ed9ca84282ee50832035af86123633fc88293
This commit is contained in:
parent
5c355d3acb
commit
f25c96f472
|
@ -262,6 +262,7 @@ class LazyVariableComputer {
|
|||
case 'load-first-author':
|
||||
$revision = $this->revisionLookup->getFirstRevision( $parameters['title'] );
|
||||
if ( $revision ) {
|
||||
// TODO T233241
|
||||
$user = $revision->getUser();
|
||||
$result = $user === null ? '' : $user->getName();
|
||||
} else {
|
||||
|
@ -409,7 +410,12 @@ class LazyVariableComputer {
|
|||
$revAuthors = $dbr->selectFieldValues(
|
||||
$revQuery['tables'],
|
||||
$revQuery['fields']['rev_user_text'],
|
||||
[ 'rev_page' => $title->getArticleID() ],
|
||||
[
|
||||
'rev_page' => $title->getArticleID(),
|
||||
// TODO Should deleted names be counted in the 10 authors? If yes, this check should
|
||||
// be moved inside the foreach
|
||||
'rev_deleted' => 0
|
||||
],
|
||||
$fname,
|
||||
// Some pages have < 10 authors but many revisions (e.g. bot pages)
|
||||
[ 'ORDER BY' => 'rev_timestamp DESC, rev_id DESC',
|
||||
|
|
Loading…
Reference in a new issue