What is the problem?
IPInfo does not retrieve info from IPoid for IPv6 addresses. The fields returned in the /w/rest.php/ipinfo/v0/revision/ request are all null.
It seems to make the request to /feed/v1/ip/<ip> using capital letters in IPv6 addresses. IPoid does not recognise these, even if the lower case version of the same IP exists.
It seems like IPoid stores IP addresses in whatever format they are given. So if they are in lower case it stores them as lower case, and upper case as upper case. Perhaps they should be normalised, making sure we are consistent between IPInfo and IPoid in terms of our normalisation.
Steps to reproduce problem
- Copy the reproduction data locally, gzip it and save it in your tmp/ directory (e.g. as reprod.json.gz)
- In the ipoid directory, start docker (e.g docker compose up -d)
- docker compose exec web node -e "require('./create-users.js')();"
- docker compose exec web node -e "require('./init-db.js').init(true);"
- docker compose exec web ./diff.sh --today tmp/reprod.json.gz
- docker compose exec web ./import.sh 0
- In the LocalSettings.php file for your test wiki, put $wgIPInfoIpoidUrl = 'http://localhost:6927'; (if this doesn't work, try something like $wgIPInfoIpoidUrl = 'http://172.18.0.1:6927'; instead)
- Make an edit with the IP address 2001:0db8:0000:0000:0000:8a2e:0370:7334 (see instructions)
- Login as a user who has IPInfo enabled
- Open your browser tools and go to Special:Contributions/2001:0db8:0000:0000:0000:8a2e:0370:7334
- In the network tab, you will see a request like /w/rest.php/ipinfo/v0/revision/559?dataContext=infobox&language=en. Open this request in a new window (you should be able to right-click and and "copy url").
Expected behaviour: The section ipinfo-source-ipoid will have data in it (such as the screenshot below)
Observed behaviour: This section will have only null values (such as the screenshot below)
Environment
ipoid commit 1814c4b30f20deaf569a6cf41b5d491135a0ae6d
CheckUser version CheckUser 2.5 (c72cefb) 07:32, 10 January 2024
Reproduction data
{"ip": "2001:0db8:0000:0000:0000:8a2e:0370:7334", "as": {}, "organization": "0", "location": {"city": false}, "client": {"behaviors": [null, "foo"]}, "risks": ["CALLBACK_PROXY"]}