Skip to content
Snippets Groups Projects
Commit 7dd0573b authored by Paul-Christian Volkmer's avatar Paul-Christian Volkmer Committed by Daniel Gerhardt
Browse files

Also block local access using IPv6

parent 4a930bb3
1 merge request!63Also block local access using IPv6
Pipeline #9133 passed with stages
in 4 minutes and 20 seconds
...@@ -85,7 +85,7 @@ public class WelcomeController extends AbstractController { ...@@ -85,7 +85,7 @@ public class WelcomeController extends AbstractController {
final HttpServletRequest request final HttpServletRequest request
) { ) {
/* Block requests from the server itself to prevent DoS attacks caused by request loops */ /* Block requests from the server itself to prevent DoS attacks caused by request loops */
if ("127.0.0.1".equals(request.getRemoteAddr())) { if ("127.0.0.1".equals(request.getRemoteAddr()) || "::1".equals(request.getRemoteAddr())) {
throw new BadRequestException("Access to localhost not allowed."); throw new BadRequestException("Access to localhost not allowed.");
} }
/* Block requests to servers in private networks */ /* Block requests to servers in private networks */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment