Commit 6eff7f0
committed
bug symfony#50552 [Security] Allow custom scheme to be used as redirection URIs (Spomky)
This PR was merged into the 5.4 branch.
Discussion
----------
[Security] Allow custom scheme to be used as redirection URIs
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix symfony#50500
| License | MIT
| Doc PR | not needed
ping `@sdespont` and `@MatTheCat`
This PR aims at fixing the redirection issue where only URLs starting with `http` are allowed.
With the modified behavior, it is now allowed to use any URL scheme. It will be possible to redirect to `android-app://com.google.android.gm/`.
~In addition, it prevents the redirection to the following URLs:~
* ~With path traversal e.g. `https://example.com/foo/../../.htpasswd`~
* ~With protocol-relative e.g. `//malicious.app/foo/bar`~
Commits
-------
3a6969f [Security] Allow custom scheme to be used as redirection URIsFile tree
2 files changed
+52
-1
lines changed- src/Symfony/Component/Security/Http
- Tests
2 files changed
+52
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
61 | 109 | | |
62 | 110 | | |
63 | 111 | | |
| |||
77 | 125 | | |
78 | 126 | | |
79 | 127 | | |
| 128 | + | |
80 | 129 | | |
81 | 130 | | |
82 | 131 | | |
| |||
0 commit comments