8000 Added support for the `0.0.0.0/0` trusted proxy · symfony/symfony@3188e1b · GitHub
[go: up one dir, main page]

Skip to content

Commit 3188e1b

Browse files
zerkmsfabpot
authored andcommitted
Added support for the 0.0.0.0/0 trusted proxy
1 parent 8059dc1 commit 3188e1b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public function getConfigTreeBuilder()
5252
}
5353

5454
if (false !== strpos($v, '/')) {
55+
if ('0.0.0.0/0' === $v) {
56+
return false;
57+
}
58+
5559
list($v, $mask) = explode('/', $v, 2);
5660

5761
if (strcmp($mask, (int) $mask) || $mask < 1 || $mask > (false !== strpos($v, ':') ? 128 : 32)) {

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function getTestValidTrustedProxiesData()
6666
array(array(), array()),
6767
array(array('10.0.0.0/8'), array('10.0.0.0/8')),
6868
array(array('::ffff:0:0/96'), array('::ffff:0:0/96')),
69+
array(array('0.0.0.0/0'), array('0.0.0.0/0')),
6970
);
7071
}
7172

0 commit comments

Comments
 (0)
0