MDL-29805 redirect: added check REQUIRE_CORRECT_ACCESS is true
authorSam Hemelryk <sam@moodle.com>
Tue, 11 Dec 2012 20:46:45 +0000 (09:46 +1300)
committerSam Hemelryk <sam@moodle.com>
Tue, 11 Dec 2012 20:47:00 +0000 (09:47 +1300)
lib/setuplib.php

index fc786c4..9b03ff0 100644 (file)
@@ -762,7 +762,7 @@ function initialise_fullme() {
                 define('NO_MOODLE_COOKIES', true);
             }
             // The login/token.php script should call the correct url/port.
-            if (defined('REQUIRE_CORRECT_ACCESS')) {
+            if (defined('REQUIRE_CORRECT_ACCESS') && REQUIRE_CORRECT_ACCESS) {
                 $wwwrootport = empty($wwwroot['port'])?'':$wwwroot['port'];
                 $calledurl = $rurl['host'];
                 if (!empty($rurl['port'])) {