This commit is contained in:
Kevin Locke 2022-09-21 22:57:32 +02:00 committed by GitHub
commit e9b131a616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

20
acme.sh
View File

@ -4857,9 +4857,11 @@ $_authorizations_map"
_debug "writing token:$token to $wellknown_path/$token" _debug "writing token:$token to $wellknown_path/$token"
mkdir -p "$wellknown_path" # Ensure .well-known is visible to web server user/group
# https://github.com/Neilpang/acme.sh/pull/32
if ! printf "%s" "$keyauthorization" >"$wellknown_path/$token"; then if ! (umask ugo+rx \
&& mkdir -p "$wellknown_path" \
&& printf "%s" "$keyauthorization" >"$wellknown_path/$token"); then
_err "$d:Can not write token to file : $wellknown_path/$token" _err "$d:Can not write token to file : $wellknown_path/$token"
_clearupwebbroot "$_currentRoot" "$removelevel" "$token" _clearupwebbroot "$_currentRoot" "$removelevel" "$token"
_clearup _clearup
@ -4867,18 +4869,6 @@ $_authorizations_map"
return 1 return 1
fi fi
if [ ! "$usingApache" ]; then
if webroot_owner=$(_stat "$_currentRoot"); then
_debug "Changing owner/group of .well-known to $webroot_owner"
if ! _exec "chown -R \"$webroot_owner\" \"$_currentRoot/.well-known\""; then
_debug "$(cat "$_EXEC_TEMP_ERR")"
_exec_err >/dev/null 2>&1
fi
else
_debug "not changing owner/group of webroot"
fi
fi
fi fi
elif [ "$vtype" = "$VTYPE_ALPN" ]; then elif [ "$vtype" = "$VTYPE_ALPN" ]; then
acmevalidationv1="$(printf "%s" "$keyauthorization" | _digest "sha256" "hex")" acmevalidationv1="$(printf "%s" "$keyauthorization" | _digest "sha256" "hex")"