From 5e6bccb68f68be5d0ffe37e0e3a91f98f871ac82 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Mon, 8 Feb 2021 18:41:55 +0100 Subject: [PATCH] Update v-check-api-key --- bin/v-check-api-key | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/v-check-api-key b/bin/v-check-api-key index 8d0d409e1..2c6ccd0ac 100755 --- a/bin/v-check-api-key +++ b/bin/v-check-api-key @@ -19,6 +19,11 @@ time_n_date=$(date +'%T %F') time=$(echo "$time_n_date" |cut -f 1 -d \ ) date=$(echo "$time_n_date" |cut -f 2 -d \ ) +if [[ -z $key || ${#key} -lt 16 ]]; then + echo "Error: not valid keysh" + echo "$date $time api $ip failed to login" >> $VESTA/log/auth.log + exit 9 +fi #----------------------------------------------------------# # Action #