Skip to content

Commit

Permalink
Adds IPv6 exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed May 16, 2022
1 parent 5857011 commit cc7e86d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/mxgraph/online/ProxyServlet.java
Expand Up @@ -282,6 +282,8 @@ public boolean checkUrlParameter(String url)
&& !hostAddress.startsWith("192.168.") // 192.168.0.0/16
&& !hostAddress.startsWith("198.18.") // 198.18.0.0/15
&& !hostAddress.startsWith("198.19.") // 198.18.0.0/15
&& !hostAddress.startsWith("fc00::") // fc00::/7 https://stackoverflow.com/questions/53764109/is-there-a-java-api-that-will-identify-the-ipv6-address-fd00-as-local-private
&& !hostAddress.startsWith("fd00::") // fd00::/8
&& !host.endsWith(".arpa"); // reverse domain (needed?)
}
catch (MalformedURLException e)
Expand Down

0 comments on commit cc7e86d

Please sign in to comment.