Page MenuHomePhabricator

Remove calls to GeoIP 1 in Extension:LandingCheck
Closed, ResolvedPublic

Description

LandingCheck uses geoip_country_code_by_name which uses the sunset geoip1 database that isn't updated since April 2022, so it's likely to return invalid results. It should move to use the geoip 2 interface or at least remove the call:

https://gerrit.wikimedia.org/g/mediawiki/extensions/LandingCheck/+/9977828e2e4c4ce1ef88384807192ed03fae4a37/includes/SpecialLandingCheck.php#108

Event Timeline

Joe removed jijiki as the assignee of this task.Nov 29 2023, 9:08 AM
Reedy renamed this task from Remove calls to Geop1 in Extension:LandingCheck to Remove calls to GeoIP 1 in Extension:LandingCheck.Nov 29 2023, 11:28 AM
Joe triaged this task as High priority.Dec 5 2023, 7:21 AM

Raising the priority because at best Special:landingcheck is using data from 1 year and a half ago. Given we're entering our main fundraiser, this should probably be solved?

Thanks for the heads up @Joe! We'll look into this.

Oops, we did this last March for Special:FundraiserLandingPage in T301485: PHP Warning: geoip_country_code_by_name(): Required database not available at /usr/share/GeoIP/GeoIP.dat. but didn't notice that LandingCheck had it too.

Both are first consulting the GeoIP cookie that varnish adds to the request. When that's missing we aren't likely to get any better results from a PHP-level lookup, so we can just remove the code to fall back to geoip_country_code_by_name as we did with FundraiserLandingPage.

Change 981327 had a related patch set uploaded (by Damilare Adedoyin; author: Damilare Adedoyin):

[mediawiki/extensions/LandingCheck@master] Remove calls to GeoIP 1 in Extension:LandingCheck

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

Change 981327 merged by jenkins-bot:

[mediawiki/extensions/LandingCheck@master] Remove calls to GeoIP 1 in Extension:LandingCheck

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

XenoRyet set Final Story Points to 4.