diff --git a/src/main/java/com/mxgraph/online/ProxyServlet.java b/src/main/java/com/mxgraph/online/ProxyServlet.java index 90de9d6fe2..1223f1e84f 100644 --- a/src/main/java/com/mxgraph/online/ProxyServlet.java +++ b/src/main/java/com/mxgraph/online/ProxyServlet.java @@ -78,6 +78,12 @@ else if (Utils.sanitizeUrl(urlParam)) try(OutputStream out = response.getOutputStream()) { + if ("draw.io".equals(ua)) + { + log.log(Level.SEVERE, "Infinite loop detected, proxy should not call itself"); + throw new UnsupportedContentException(); + } + request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");