Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 81605dd

Browse filesBrowse files
committed
bug #15706 [framework-bundle] Added support for the 0.0.0.0/0 trusted proxy (zerkms)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15706). Discussion ---------- [framework-bundle] Added support for the `0.0.0.0/0` trusted proxy | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT It is relevant to my other PR: #14690 The original intention was to start accepting `0.0.0.0/0` as a trusted proxy (which is a valid CIDR notation). The prupose is to allow all requests to be treated as trusted and to eliminate using dirty `['0.0.0.0/1', '128.0.0.0/1']` workaround. Commits ------- 3188e1b Added support for the `0.0.0.0/0` trusted proxy
2 parents 8059dc1 + 3188e1b commit 81605dd
Copy full SHA for 81605dd

File tree

2 files changed

+5
-0
lines changed
Filter options

2 files changed

+5
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+4Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.