mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 01:02:14 +00:00
Fix StrictHttpFirewall rules
Fixes: gh-5044
This commit is contained in:
parent
1d0e97880d
commit
949c7d68b8
@ -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