mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-14 06:13:30 +00:00
Fix StrictHttpFirewall rules
Fixes: gh-5093
This commit is contained in:
parent
93118f4e91
commit
5854f00977
@ -340,7 +340,7 @@ public class StrictHttpFirewall implements HttpFirewall {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (path.indexOf("//") > 0) {
|
||||
if (path.indexOf("//") > -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,8 @@ import static org.assertj.core.api.Assertions.fail;
|
||||
*/
|
||||
public class StrictHttpFirewallTests {
|
||||
public String[] unnormalizedPaths = { "/..", "/./path/", "/path/path/.", "/path/path//.", "./path/../path//.",
|
||||
"./path", ".//path", ".", "/path//" };
|
||||
"./path", ".//path", ".", "//path", "//path/path", "//path//path", "/path//path" };
|
||||
|
||||
|
||||
private StrictHttpFirewall firewall = new StrictHttpFirewall();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user