Page MenuHomePhabricator

Prevent saving client hints data when the reference ID does not exist in the table
Closed, DeclinedPublic

Description

Scenario:

  • A entry is purged from cu_changes after 3 months
  • A user calls the REST API to add client hints data for this purged entry
  • The entry is then saved but never purged, as the purging script won't find it

In this situation a user could have client hints data kept for over 3 months, which would be a major issue.

Thanks to @dom_walden for spotting this.

Acceptance criteria
  • Prevent insertion of mapping rows if the reference ID with associated map ID does not refer to an existing row
  • Test that this behaviour occurs

Event Timeline

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

[mediawiki/extensions/CheckUser@master] [WIP] clienthints: Prevent mapping rows insert on missing reference ID

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

Change 939353 abandoned by Dreamy Jazz:

[mediawiki/extensions/CheckUser@master] clienthints: Prevent mapping rows insert on missing reference ID

Reason:

A method of using a maintenance script and timestamp filtering has been decided on after the weekly client hints meeting.

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

Closing as declined following discussions at the weekly client hints meeting.