From 4a56b2406b7b44f0f791008e7f99bf339e25292f Mon Sep 17 00:00:00 2001 From: neilpang Date: Thu, 17 Nov 2016 00:22:45 +0800 Subject: [PATCH 1/4] fix check email --- dnsapi/dns_cf.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dnsapi/dns_cf.sh b/dnsapi/dns_cf.sh index cacb5b39..7f2a0977 100755 --- a/dnsapi/dns_cf.sh +++ b/dnsapi/dns_cf.sh @@ -22,6 +22,12 @@ dns_cf_add() { return 1 fi + if ! _contains "$CF_Email" "@"; then + _err "It seems that the CF_Email=$CF_Email is not a valid email address." + _err "Please check and retry." + return 1 + fi + #save the api key and email to the account conf file. _saveaccountconf CF_Key "$CF_Key" _saveaccountconf CF_Email "$CF_Email" From ab45b7783f19447c7d7bd8a06e368a6461933b86 Mon Sep 17 00:00:00 2001 From: neilpang Date: Thu, 17 Nov 2016 00:25:40 +0800 Subject: [PATCH 2/4] fix format --- dnsapi/dns_cf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnsapi/dns_cf.sh b/dnsapi/dns_cf.sh index 7f2a0977..dd8c9143 100755 --- a/dnsapi/dns_cf.sh +++ b/dnsapi/dns_cf.sh @@ -27,7 +27,7 @@ dns_cf_add() { _err "Please check and retry." return 1 fi - + #save the api key and email to the account conf file. _saveaccountconf CF_Key "$CF_Key" _saveaccountconf CF_Email "$CF_Email" From 3498a5856aed22ee696d70c1d269a03f7f96758f Mon Sep 17 00:00:00 2001 From: neilpang Date: Fri, 18 Nov 2016 19:40:41 +0800 Subject: [PATCH 3/4] fix bug https://github.com/Neilpang/acme.sh/issues/401 --- acme.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/acme.sh b/acme.sh index 1397f870..2b2386d0 100755 --- a/acme.sh +++ b/acme.sh @@ -1705,8 +1705,6 @@ _initpath() { return 0 fi - mkdir -p "$CA_DIR" - domain="$1" _ilength="$2" @@ -1726,13 +1724,6 @@ _initpath() { _debug DOMAIN_PATH "$DOMAIN_PATH" fi - if [ ! -d "$DOMAIN_PATH" ]; then - if ! mkdir -p "$DOMAIN_PATH"; then - _err "Can not create domain path: $DOMAIN_PATH" - return 1 - fi - fi - if [ -z "$DOMAIN_CONF" ]; then DOMAIN_CONF="$DOMAIN_PATH/$domain.conf" fi @@ -3005,6 +2996,10 @@ renewAll() { for di in "${CERT_HOME}"/*.*/; do _debug di "$di" + if ! [ -d "$di" ] ; then + _debug "Not directory, skip: $di" + continue + fi d=$(basename "$di") _debug d "$d" ( @@ -3127,6 +3122,10 @@ list() { if [ "$_raw" ]; then printf "%s\n" "Main_Domain${_sep}KeyLength${_sep}SAN_Domains${_sep}Created${_sep}Renew" for di in "${CERT_HOME}"/*.*/; do + if ! [ -d "$di" ] ; then + _debug "Not directory, skip: $di" + continue + fi d=$(basename "$di") _debug d "$d" ( From 44483dba218947d8e9900912d06aa68ddd012376 Mon Sep 17 00:00:00 2001 From: neilpang Date: Fri, 18 Nov 2016 19:44:43 +0800 Subject: [PATCH 4/4] fix format --- acme.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acme.sh b/acme.sh index 2b2386d0..6f948f51 100755 --- a/acme.sh +++ b/acme.sh @@ -2996,7 +2996,7 @@ renewAll() { for di in "${CERT_HOME}"/*.*/; do _debug di "$di" - if ! [ -d "$di" ] ; then + if ! [ -d "$di" ]; then _debug "Not directory, skip: $di" continue fi @@ -3122,7 +3122,7 @@ list() { if [ "$_raw" ]; then printf "%s\n" "Main_Domain${_sep}KeyLength${_sep}SAN_Domains${_sep}Created${_sep}Renew" for di in "${CERT_HOME}"/*.*/; do - if ! [ -d "$di" ] ; then + if ! [ -d "$di" ]; then _debug "Not directory, skip: $di" continue fi