Skip to content

Commit 3fc8c68

Browse files
committed
last change
1 parent 0ff81bd commit 3fc8c68

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

backend/utils/validation.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ def validate_url_for_http_request(url: str, field_name: str = "URL") -> None:
181181

182182
# Try to resolve hostname as IP address
183183
try:
184-
# Handle IPv6 addresses in brackets
185-
ip_str = hostname.strip("[]")
186-
ip = ipaddress.ip_address(ip_str)
184+
ip = ipaddress.ip_address(hostname)
187185

188186
# Block cloud metadata service IPs (AWS, GCP, Azure, etc.)
189187
# AWS/Azure metadata service: 169.254.169.254

0 commit comments

Comments
 (0)