forked from I2P_Developers/i2p.i2p
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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user