moodlelib MDL-20110 - allow remoteip_in_list to return true for cli access
Previously it always failed and restricted access for users blocking ips and running cron from cli
This commit is contained in:
@@ -8432,6 +8432,12 @@ function cleardoubleslashes ($path) {
|
||||
function remoteip_in_list($list){
|
||||
$inlist = false;
|
||||
$client_ip = getremoteaddr();
|
||||
|
||||
if(!$client_ip){
|
||||
// ensure access on cli
|
||||
return true;
|
||||
}
|
||||
|
||||
$list = explode("\n", $list);
|
||||
foreach($list as $subnet) {
|
||||
$subnet = trim($subnet);
|
||||
|
||||
Reference in New Issue
Block a user