Summary
The MediaWiki-extensions-IPReputation AbuseFilter variables work for actions being currently filtered. However, they do not use the correct IP when inspecting past edits. We should support this by getting the IP from the RecentChange object.
Background
- AbuseFilter allows generating variables for both actions currently being filtered (i.e. at the same time as the action is being performed) and for historical actions
- The MediaWiki-extensions-IPReputation AbuseFilter variables currently are generated for both types of actions
- However, when generating the values for previous actions the IP used is the IP address used by the request that asked for the variables to be generated (which would be the viewing users' IP address)
- Generating the variables for historical actions should present no additional privacy concerns because the variables could have been generated when the action was being filtered and also the variables cannot be accessed once the IP address is purged from recentchanges table (which is the same amount of time as purging the protected variable values on WMF wikis)
Acceptance criteria
- When generating MediaWiki-extensions-IPReputation AbuseFilter variables for a historical action, the IP address used is the IP address for the action in the recentchanges table