Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.8
-
Fix Version/s: 2.0
-
Component/s: Events API
-
Labels:None
-
Environment:LAMP , debian Etch
-
Database:MySQL
-
Affected Branches:MOODLE_18_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
When logging in into my moodle environment, I am getting :
NOTICE: cleanremoteaddr gives us something funny: 172.16.10.165, 172.16.10.165, 127.0.0.1, 84.195.113.230 had 2 matches, referer: http://moodle.daar.be/admin/settings.php
in my logs.
When dumping the $goodmatches array, I am getting these ip's : 127.0.0.1, 84.195.113.230. I was able to change these sources:
if (($bits[0] == 10)
6360 || ($bits[0] == 172 && $bits[1] >= 16 && $bits[1] <= 31)
6361 || ($bits[0] == 192 && $bits[1] == 168)
6362 || ($bits[0] == 169 && $bits[1] == 254))
to this:
if (($bits[0] == 10)
6360 || ($bits[0] == 172 && $bits[1] >= 16 && $bits[1] <= 31)
6361 || ($bits[0] == 192 && $bits[1] == 168)
6362 || ($bits[0] == 169 && $bits[1] == 254)
6363 || ($bits[0] == 127 ))
and it resolved the notice.
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
cleanremoteaddr() was redefined in 2.0, it now allows local and intranet addresses too.
Thanks for the report.
Petr Skoda