URLproxy access check too tight

respect config ip pattern (was own ip)
pull/1/head
reger 11 years ago
parent ebfaf753b7
commit c589ee8c6e

@ -83,13 +83,11 @@ public class YaCyProxyServlet extends ProxyServlet implements Servlet {
final String remoteHost = req.getRemoteHost();
if (!Domains.isThisHostIP(remoteHost)) {
response.sendError(HttpServletResponse.SC_FORBIDDEN,
"proxy use not granted for IP " + remoteHost);
return;
} else if (!proxyippatternmatch(remoteHost)) {
response.sendError(HttpServletResponse.SC_FORBIDDEN,
"proxy use not granted for IP " + remoteHost);
return;
if (!proxyippatternmatch(remoteHost)) {
response.sendError(HttpServletResponse.SC_FORBIDDEN,
"proxy use not granted for IP " + remoteHost);
return;
}
}
if ("CONNECT".equalsIgnoreCase(request.getMethod())) {

Loading…
Cancel
Save