summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-07-19 13:04:17 +0200
committerAndrey Andreev <narf@devilix.net>2016-07-19 13:04:17 +0200
commit9fd9248a2d712d5ae95bf2e6c6cd036e6b522cbb (patch)
tree07a175d72316b818e91150dd8f387993ce54274c /tests
parent17fa8defc1b580df4395200f6536498918bc6ea6 (diff)
Fix #4679
Diffstat (limited to 'tests')
-rw-r--r--tests/codeigniter/core/Input_test.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php
index c56900d22..e1f4011b5 100644
--- a/tests/codeigniter/core/Input_test.php
+++ b/tests/codeigniter/core/Input_test.php
@@ -262,6 +262,12 @@ class Input_test extends CI_TestCase {
$this->assertEquals('FE80:0000:0000:0000:0202:B3FF:FE1E:8300', $this->input->ip_address());
$this->input->ip_address = FALSE;
+ $this->ci_set_config('proxy_ips', '0::/32');
+ $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.7';
+ $_SERVER['REMOTE_ADDR'] = '0000:0000:0000:0000:0000:0000:0000:0001';
+ $this->assertEquals('127.0.0.7', $this->input->ip_address());
+
+ $this->input->ip_address = FALSE;
$_SERVER['REMOTE_ADDR'] = '127.0.0.1'; // back to reality
}