i2psnark standalone: Add DNS rebinding protection

Add context config file to turn it off
Console: Mark request handled when rejecting in HostCheckHandler
XSSFilter: Catch cascaded ISE
This commit is contained in:
zzz
2018-02-24 16:43:15 +00:00
parent 9d989c6a67
commit 5b0680b29e
8 changed files with 172 additions and 4 deletions

View File

@@ -33,7 +33,11 @@ public class XSSFilter implements Filter {
// We need to send the error quickly, if we just throw a ServletException,
// the data keeps coming and the connection gets reset.
// This way we at least get the error to the browser.
((HttpServletResponse)response).sendError(413, ise.getMessage());
try {
((HttpServletResponse)response).sendError(413, ise.getMessage());
} catch (IllegalStateException ise2) {
// Committed, probably wasn't a multipart form error after all
}
}
}
}