-
Bug
-
Resolution: Fixed
-
Major
-
3.5.14, 3.7.8, 3.8.5, 3.9.2
-
MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_310_STABLE, MOODLE_39_STABLE
-
MDL-69562_master -
A change in defaults set with MDL-69074 means it is now impossible to set CFG->getremoteaddrconf to HTTP_CLIENT_IP, HTTP_X_FORWARDED_FOR, REMOTE_ADDR (value: 0).
MDL-69074 did this:
if (empty($CFG->getremoteaddrconf)) { |
// This will happen, for example, before just after the upgrade, as the |
// user is redirected to the admin screen. |
- $variablestoskip = 0; |
+ $variablestoskip = GETREMOTEADDR_SKIP_DEFAULT; |
} else { |
$variablestoskip = $CFG->getremoteaddrconf; |
}
|
The problem is "0", which is used by "HTTP_CLIENT_IP, HTTP_X_FORWARDED_FOR, REMOTE_ADDR" equates to empty - and the empty branch of the IF no longer sets the value to 0.
We should change `if (empty(...` to `if (!isset(...` - which allows the UI/config.php to set the value to '0'.
- is a regression caused by
-
MDL-69074 New installation fails behind load balancer
- Closed