Page MenuHomePhabricator

ReplaceText background job stores random IPs in recent changes table
Closed, DeclinedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • have $wgJobRunRate > 0
  • Execute a replace text on a number of pages that triggers a background job to be scheduled for the execution

What happens?:
rc_ip in recentchanges table is filled in with random ip addresses of visitors to the site who triggered the individual jobs.

What should have happened instead?:
rc_ip in recentchanges table should be filled in with ip address of user who executed the original ReplaceText

Software version (skip for WMF-hosted wikis like Wikipedia):
MediaWiki 1.39.3
Extension:CheckUser 2.5
Extension:Replace Text 1.7

Event Timeline

Dreamy_Jazz closed this task as Resolved.EditedApr 8 2023, 9:35 PM
Dreamy_Jazz claimed this task.
Dreamy_Jazz removed a project: CheckUser.
Dreamy_Jazz subscribed.

Based on the task description, I don't think this is to do with CheckUser extension as said extension never modifies the rc_ip column (only reads from it when running update.php for the first time after installation of CheckUser).

If you mean the tables added by the CheckUser extension, then there are hooks provided by CheckUser since 1.40 that would allow the IP in cu_changes to be stored correctly.

As such I'm untagging CheckUser. If it is related please feel free to re-tag with some detail about what needs to be be done in the CheckUser extension. Alternatively another ticket could be filed regarding integrating with CheckUser as the fix for CheckUser would be different to the fix for recent changes.

Dreamy_Jazz removed Dreamy_Jazz as the assignee of this task.

Didn't mean to close. Mobile phabricator didn't tell me it was going to close it.

Yaron_Koren subscribed.

I'm declining this bug - as strange as this behavior is, it does seem to be the standard outcome when edits are made via jobs: the IP recorded is of the user who triggered the job to run, not the user who created the job in the first place. I looked through the code, and there doesn't seem to be a way to set the "rc_ip" value to anything other than the IP address of the user currently in the session. Which means that this storage appears to be the desired behavior.