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

@ -78,6 +78,7 @@ public class HostCheckHandler extends HandlerWrapper
"\" to advanced configuration and restart.";
log.logAlways(Log.WARN, s);
httpResponse.sendError(403, s);
baseRequest.setHandled(true);
return;
}
@ -92,6 +93,7 @@ public class HostCheckHandler extends HandlerWrapper
if (Boolean.valueOf(redir) ||
(redir == null && "1".equals(httpRequest.getHeader("Upgrade-Insecure-Requests")))) {
sendRedirect(httpsPort, httpRequest, httpResponse);
baseRequest.setHandled(true);
return;
}
}