1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-06-15 06:32:23 +00:00
This commit is contained in:
Arnaud Roques 2024-05-14 18:30:09 +02:00
parent eafc9c442c
commit 2680086893
2 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,7 @@ public class OldProxyServlet extends HttpServlet {
/**
* Proxy request URI regex pattern.
*/
private static final Pattern PROXY_PATTERN = Pattern.compile("/\\w+/proxy/((\\d+)/)?((\\w+)/)?(https?://.*)");
private static final Pattern PROXY_PATTERN = Pattern.compile("/\\w+/proxy/((\\d+)/)?((\\w+)/)?(https?://[^@]*)");
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {

View File

@ -52,6 +52,9 @@ public class ProxyServlet extends HttpServlet {
if (full == null) {
return true;
}
if (full.contains("@")) {
return true;
}
if (full.startsWith("https://") == false && full.startsWith("http://") == false) {
return true;
}