From 4a56b2406b7b44f0f791008e7f99bf339e25292f Mon Sep 17 00:00:00 2001 From: neilpang Date: Thu, 17 Nov 2016 00:22:45 +0800 Subject: [PATCH] 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"