Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'wip-mdl-29396-m21' of git://github.com/rajeshtaneja/moo…

…dle into MOODLE_21_STABLE
  • Loading branch information...
commit 52f04e91a1b6be186d15b9eee50f23720980f2d7 2 parents da86b56 + a7371c4
@nebgor nebgor authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 lib/setup.php
View
14 lib/setup.php
@@ -808,12 +808,14 @@ function stripslashes_deep($value) {
}
}
-// in the first case, ip in allowed list will be performed first
-// for example, client IP is 192.168.1.1
-// 192.168 subnet is an entry in allowed list
-// 192.168.1.1 is banned in blocked list
-// This ip will be banned finally
-if (!empty($CFG->allowbeforeblock)) { // allowed list processed before blocked list?
+if (CLI_SCRIPT and !defined('WEB_CRON_EMULATED_CLI') and !PHPUNIT_SCRIPT) {
+ // no ip blocking
+} else if (!empty($CFG->allowbeforeblock)) { // allowed list processed before blocked list?
+ // in this case, ip in allowed list will be performed first
+ // for example, client IP is 192.168.1.1
+ // 192.168 subnet is an entry in allowed list
+ // 192.168.1.1 is banned in blocked list
+ // This ip will be banned finally
if (!empty($CFG->allowedip)) {
if (!remoteip_in_list($CFG->allowedip)) {
die(get_string('ipblocked', 'admin'));
Please sign in to comment.
Something went wrong with that request. Please try again.