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(); final String remoteHost = req.getRemoteHost();
if (!Domains.isThisHostIP(remoteHost)) { if (!Domains.isThisHostIP(remoteHost)) {
response.sendError(HttpServletResponse.SC_FORBIDDEN, if (!proxyippatternmatch(remoteHost)) {
"proxy use not granted for IP " + remoteHost); response.sendError(HttpServletResponse.SC_FORBIDDEN,
return; "proxy use not granted for IP " + remoteHost);
} else if (!proxyippatternmatch(remoteHost)) { return;
response.sendError(HttpServletResponse.SC_FORBIDDEN, }
"proxy use not granted for IP " + remoteHost);
return;
} }
if ("CONNECT".equalsIgnoreCase(request.getMethod())) { if ("CONNECT".equalsIgnoreCase(request.getMethod())) {

Loading…
Cancel
Save