From 16d44f9ba4b4cba2339534d0fa12a8f34ae523f1 Mon Sep 17 00:00:00 2001 From: Abhinav Singh Date: Thu, 31 Aug 2023 17:18:08 -0700 Subject: [PATCH] fix: [CODE-760]: intenral mapping --- internal/api/controller/webhook/common.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/api/controller/webhook/common.go b/internal/api/controller/webhook/common.go index 2c144864f..459fc5d84 100644 --- a/internal/api/controller/webhook/common.go +++ b/internal/api/controller/webhook/common.go @@ -40,9 +40,9 @@ func checkURL(rawURL string, allowLoopback bool, allowPrivateNetwork bool) error // basic validation for loopback / private network addresses (only sanitary to give user an early error) // IMPORTANT: during webook execution loopback / private network addresses are blocked (handles DNS resolution) // - //if host == "localhost" { - // return check.NewValidationError("localhost is not allowed.") - //} + if host == "localhost" { + return check.NewValidationError("localhost is not allowed.") + } if ip := net.ParseIP(host); ip != nil { if !allowLoopback && ip.IsLoopback() {