Added support for the 0.0.0.0/0
trusted proxy
This commit is contained in:
parent
8059dc1bab
commit
3188e1b5d2
@ -52,6 +52,10 @@ class Configuration implements ConfigurationInterface
|
||||
}
|
||||
|
||||
if (false !== strpos($v, '/')) {
|
||||
if ('0.0.0.0/0' === $v) {
|
||||
return false;
|
||||
}
|
||||
|
||||
list($v, $mask) = explode('/', $v, 2);
|
||||
|
||||
if (strcmp($mask, (int) $mask) || $mask < 1 || $mask > (false !== strpos($v, ':') ? 128 : 32)) {
|
||||
|
@ -66,6 +66,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
|
||||
array(array(), array()),
|
||||
array(array('10.0.0.0/8'), array('10.0.0.0/8')),
|
||||
array(array('::ffff:0:0/96'), array('::ffff:0:0/96')),
|
||||
array(array('0.0.0.0/0'), array('0.0.0.0/0')),
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user