Fix IPv6 URL when trying to fetch challenge ourselves for debugging

Fixes the following error when debugging is enabled:

[Sat Feb 21 04:00:22 CET 2026] Here is the curl dump log:
[Sat Feb 21 04:00:22 CET 2026] * URL rejected: Port number was not a decimal number between 0 and 65535
* closing connection #-1

IPv6 addresses in URLs need to be written like this:

    http://[2001:43:5::250]
This commit is contained in:
Peter Gerber
2026-02-21 04:36:29 +01:00
committed by Peter Gerber
parent 12f147bf40
commit b5bfd08e35

View File

@@ -5181,7 +5181,12 @@ $_authorizations_map"
if [ "$DEBUG" ]; then
if [ "$vtype" = "$VTYPE_HTTP" ]; then
_debug "Debug: GET token URL."
_get "http://$d/.well-known/acme-challenge/$token" "" 1
if _isIPv6 "$d"; then
host="[$d]"
else
host="$d"
fi
_get "http://$host/.well-known/acme-challenge/$token" "" 1
fi
fi
_clearupwebbroot "$_currentRoot" "$removelevel" "$token"