In https://github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelector/blob/4dc4b7b81ba16a6fa7e39b2341c3f890e5b6464a/UniversalLanguageSelector.hooks.php#L130 - it appears ULS at least conditionally uses GeoIP data from https://meta.wikimedia.org/geoiplookup. We'll need to fix this to use some alternative free/public source, or have the extension optionally bundle its own server-side service, or just remove the code entirely.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
ULS: Use GeoIP Cookie exclusively for geolocation | mediawiki/extensions/UniversalLanguageSelector | master | +47 -57 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | BBlack | T121925 [EPIC] GeoIP lookup for IPv6 connections delays banner loading | |||
Open | None | T121937 [EPIC] Fix and improve geolocation, and ensure it's working properly for FR campaigns | |||
Resolved | BBlack | T100902 Get rid of geoiplookup service | |||
Resolved | BBlack | T143270 ULS GeoIP should not use meta.wm.o/geoiplookup | |||
Resolved | BBlack | T99226 Switch Varnish's GeoIP code to libmaxminddb/GeoIP2 | |||
Resolved | Nikerabbit | T143542 Switch default ULS geoip provider |
Event Timeline
Change 305412 had a related patch set uploaded (by BBlack):
ULS: Use GeoIP Cookie exclusively for geolocation
The cookie is already always used on WMF sites, because $wgULSGeoService = false; in CommonSettings.php. All other users however use the given URL by default.
Ok, I guess I missed the cookie-parsing code in ULS.... or is it relying on the fact that CN has already parsed it into window.Geo?
So, the obvious options are:
http://freegeoip.net/json/8.8.8.8
http://geoip.nekudo.com/api/8.8.8.8
Both of these return simple JSON data and are public, and we could do JSON-P here as well as an option. Each has slightly different field naming/structure vs our existing "Geo" layout, though, which would need to be mapped appropriately. We could suggest both as alternative provider settings, and have our JS code automagically support both formats by mapping either layout into the existing Geo fields (based on the observed data keys)?
Simplest thing would be to switch the default freegeoip.net which is already supported and give some time for people update to new MediaWiki Language Extension Bundle or change the configuration manually.
geoip.nekudo.com is on EasyPrivacy blocklist and has a format which is not already supported.
Ah, yes, I see now for country_code it does via https://github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelector/blob/9e0dcbde35f3c6c70da3273fad72ebe0fa0e720b/resources/js/ext.uls.common.js#L136 :
return window.Geo && ( window.Geo.country || window.Geo.country_code );
Ditto the other ticket:
This seems resolved with the new release yesterday:
https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle#Latest_release
https://lists.wikimedia.org/pipermail/mediawiki-i18n/2016-August/001084.html
Thanks everyone!