From b5bfd08e3566afb63b87a35f74238439dbb3e59b Mon Sep 17 00:00:00 2001 From: Peter Gerber Date: Sat, 21 Feb 2026 04:36:29 +0100 Subject: [PATCH] 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] --- acme.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/acme.sh b/acme.sh index 7a3c35a8..d6804648 100755 --- a/acme.sh +++ b/acme.sh @@ -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"