Fix StrictHttpFirewall rules

Fixes: gh-5044
This commit is contained in:
Rob Winch 2018-03-08 21:29:31 -06:00
parent 1d0e97880d
commit 949c7d68b8
2 changed files with 3 additions and 2 deletions

View File

@ -340,7 +340,7 @@ public class StrictHttpFirewall implements HttpFirewall {
return true;
}
if (path.indexOf("//") > 0) {
if (path.indexOf("//") > -1) {
return false;
}

View File

@ -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();