Content-Length: 78181 | pFad | http://phabricator.wikimedia.org/T382889

s ⚓ T382889 UserSelectQueryBuilder::named returns non-named users
Page MenuHomePhabricator

UserSelectQueryBuilder::named returns non-named users
Closed, ResolvedPublicBUG REPORT

Description

UserSelectQueryBuilder has a named() filter to ensure only named users are returned. Unfortunately, it seems to have a bug. The following code:

var_dump(
	$this->getServiceContainer()->getUserIdentityLookup()
		->newSelectQueryBuilder()
		->named()
		->fetchUserNames()
);

returns the following on my system:

[...]
  string(14) "147.32.219.118"
  [57]=>
  string(10) "172.19.0.1"
  [58]=>
  string(10) "172.26.0.1"
  [59]=>
  string(11) "192.168.0.1"
[...]

Those actors are certainly not named, but they are indeed not temporary.

Event Timeline

Urbanecm_WMF triaged this task as High priority.

This is happening, because User::isNamed and UserSelectQueryBuilder::named have very different implementations. While User::isNamed checks for "is registered and is not temporary", UserSelectQueryBuilder::named only checks for "is not a temporary account". This is a bug that should be fixed...

Change #1107951 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/core@master] UserSelectQueryBuilder: Do not consider unregistered actors to be named

https://gerrit.wikimedia.org/r/1107951

Change #1107951 merged by jenkins-bot:

[mediawiki/core@master] UserSelectQueryBuilder: Do not consider unregistered actors to be named

https://gerrit.wikimedia.org/r/1107951

Urbanecm_WMF changed the subtype of this task from "Task" to "Bug Report".








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://phabricator.wikimedia.org/T382889

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy