Skip to content

Commit 9374a42

Browse files
committed
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]
1 parent 12f147b commit 9374a42

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

acme.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5181,7 +5181,12 @@ $_authorizations_map"
51815181
if [ "$DEBUG" ]; then
51825182
if [ "$vtype" = "$VTYPE_HTTP" ]; then
51835183
_debug "Debug: GET token URL."
5184-
_get "http://$d/.well-known/acme-challenge/$token" "" 1
5184+
if _isIPv6 "$d"; then
5185+
host="[$d]"
5186+
else
5187+
host="$d"
5188+
fi
5189+
_get "http://$host/.well-known/acme-challenge/$token" "" 1
51855190
fi
51865191
fi
51875192
_clearupwebbroot "$_currentRoot" "$removelevel" "$token"

0 commit comments

Comments
 (0)