mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-23 06:35:56 -07:00
Improve error 400 details updating LE challenge
In a string like: { "type": "urn:ietf:params:acme:error:malformed", "detail": "Unable to update challenge :: authorization must be pending", "status": 400 } It picks the value for "details". So the user will have more info about the let's encrypt error and not only a 400 blind error
This commit is contained in:
parent
84ef0a118f
commit
d952a081c7
1 changed files with 2 additions and 1 deletions
|
@ -200,8 +200,9 @@ for auth in $authz; do
|
|||
validation=$(echo "$answer"|grep -A1 $proto |tail -n1|cut -f4 -d \")
|
||||
nonce=$(echo "$answer" |grep Nonce |cut -f2 -d \ |tr -d '\r\n')
|
||||
status=$(echo "$answer"|grep HTTP/1.1 |tail -n1 |cut -f 2 -d ' ')
|
||||
details=$(echo "$answer"| grep detail | cut -f 2 -d ',' | cut -f 2-4 -d ':')
|
||||
if [[ "$status" -ne 200 ]]; then
|
||||
check_result $E_CONNECT "Let's Encrypt validation status $status"
|
||||
check_result $E_CONNECT "Let's Encrypt validation status $status. Details: $details"
|
||||
fi
|
||||
|
||||
i=$((i + 1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue