[go: up one dir, main page]

Page MenuHomePhabricator

CheckUser records XFF: 0 on PostgreSQL
Closed, ResolvedPublic

Description

+++ This bug was initially created as a clone of Bug #37612 +++

Sample result from the test wiki:

(diff) (hist) . . N Test . . 01:44 . . Saper (Talk | contribs | block) (test)

IP: 2001:6a0:200:121::2/128   XFF: 0   Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11

on MySQL:

(różn.) (hist.) . . N Test . . 02:24 . . Saper (dyskusja | edycje | zablokuj) (cu test)

IP: 2001:6A0:200:121:0:0:0:2   Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11

"XFF: 0" starts to appear after May 7th trunk (edits made on May 7th and earlier have no XFF, edits made on June 14th and later have "XFF: 0").

Not only edits are affected, log entries are affected as well.


Version: unspecified
Severity: normal

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
InvalidNone
ResolvedDreamy_Jazz

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:25 AM
bzimport added a project: CheckUser.
bzimport set Reference to bz37613.
bzimport added a subscriber: Unknown Object (MLST).
Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.

I can confirm that this is still happening on the most up to date version using docker.

Writing a patch for this. I think this happens because the "false" result from getHeader( 'X-Forwarded-For' ) is converted to a zero somewhere along the line. If there is no XFF header, just replace it with an empty string which is the same as no header. This also seems to happen with sqlite, but it was fixed when I did this. Not tested with postgresql.

Change 791808 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Ensure that on unprovided XFF header the DB stores nothing

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

Change 791808 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Ensure that on unprovided XFF header the DB stores nothing

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