-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1
-
MOODLE_401_STABLE
In function iplookup_find_location() we have:
$ipdata = download_file_content('http://www.geoplugin.net/json.gp?ip='.$ip);
See https://github.com/moodle/moodle/blob/MOODLE_401_STABLE/iplookup/lib.php#L76 .
If this line triggers, it will cause Moodle to try to connect to currently non-functional http://www.geoplugin.net . Curl will time out after 20 seconds, so loading the page for end-user will take over 20 seconds.
I would suggest removing this external call & dependency from iplookup_find_location() altogether. The DB file ($CFG->geoip2file) should be downloaded & configured by Moodle admin and used here if available.
- has a non-specific relationship to
-
MDL-32793 IPlookup does not work (unless MaxMind GeoLite City data is present)
- Closed
-
MDL-61169 Change to 'better' IP for geoIP tests
- Closed
-
MDL-70584 core_iplookup_geoplugin_testcase::test_ipv4() is failing
- Closed
-
MDLSITE-3780 Improve ip country detection (especially make it work for ipv6 users)
- Closed
- has been marked as being related by
-
MDL-77040 Towards better (stable) GeoIP tests...
- Closed
- is duplicated by
-
MDL-77268 Core tests are broken when https://www.geoplugin.net/ is down
- Closed