From 81f27e907723079c82789d82ceb14977a2554e4b Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 11 Oct 2016 18:05:32 +0800 Subject: [PATCH] minor, get the error info, if it contains CRLF --- acme.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acme.sh b/acme.sh index 19a8296c..98df2e48 100755 --- a/acme.sh +++ b/acme.sh @@ -2435,7 +2435,7 @@ issue() { fi if [ "$status" = "invalid" ] ; then - error="$(echo "$response" | _egrep_o '"error":\{[^\}]*\}')" + error="$(echo "$response" | tr -d "\r\n" | _egrep_o '"error":\{[^\}]*\}')" _debug2 error "$error" errordetail="$(echo $error | _egrep_o '"detail": *"[^"]*"' | cut -d '"' -f 4)" _debug2 errordetail "$errordetail" @@ -2447,7 +2447,7 @@ issue() { if [ "$DEBUG" ] ; then if [ "$vtype" = "$VTYPE_HTTP" ] ; then _debug "Debug: get token url." - _get "http://$d/.well-known/acme-challenge/$token" + _get "http://$d/.well-known/acme-challenge/$token" "" 1 fi fi _clearupwebbroot "$_currentRoot" "$removelevel" "$token"