Make sure that we check HTTP_CLIENT_IP first
This commit is contained in:
parent
9e9df72f52
commit
de5cfdab7e
2 changed files with 9 additions and 0 deletions
|
@ -54,6 +54,10 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
|
|||
require_once($CFG->dirroot . '/auth/userkey/auth.php');
|
||||
require_once($CFG->dirroot . '/user/lib.php');
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$this->resetAfterTest();
|
||||
$CFG->getremoteaddrconf = GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR;
|
||||
$this->auth = new auth_plugin_userkey();
|
||||
$this->user = self::getDataGenerator()->create_user();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,12 @@ class core_userkey_manager_testcase extends advanced_testcase {
|
|||
* Initial set up.
|
||||
*/
|
||||
public function setUp() {
|
||||
global $CFG;
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$this->resetAfterTest();
|
||||
$CFG->getremoteaddrconf = GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR;
|
||||
$this->user = self::getDataGenerator()->create_user();
|
||||
$this->config = new stdClass();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue