From e4c894eb88353f0c0fac84f3371705e129fb5459 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 15 Feb 2015 16:02:26 +0000 Subject: [PATCH] Check email length --- src/freedombone-config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/freedombone-config b/src/freedombone-config index 3e914e25..4a17b7fd 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -917,12 +917,15 @@ function interactive_configuration { done save_configuration_file - while [ ! $MY_EMAIL_ADDRESS ] + while [ ${#MY_EMAIL_ADDRESS} -lt 5 ] do EMAIL_ADDRESS=$(grep 'MY_EMAIL_ADDRESS' temp.cfg | awk -F '=' '{print $2}') if [ ! $EMAIL_ADDRESS ]; then EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME fi + if [ ${#MY_EMAIL_ADDRESS} -lt 5 ]; then + EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME + fi data=$(tempfile 2>/dev/null) trap "rm -f $data" 0 1 2 5 15