Browse Source

Solve issues with password validation

Jaap Marcus 3 years ago
parent
commit
58ba3a0b80
1 changed files with 5 additions and 3 deletions
  1. 5 3
      bin/v-check-user-password

+ 5 - 3
bin/v-check-user-password

@@ -14,7 +14,7 @@
 user=$1
 password=$2; HIDE=2
 ip46=${3-127.0.0.1}
-return_hash=${4-no}
+return_hash=$4
 
 # Includes
 # shellcheck source=/etc/hestiacp/hestia.conf
@@ -32,8 +32,8 @@ date=$(echo "$time_n_date" |cut -f 2 -d \ )
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '2' "$#" 'USER PASSWORD [ip] [RETURN_HASH]'
-is_format_valid 'user' 'password' 'ip46'
+check_args '2' "$#" 'USER PASSWORD [IP] [RETURN_HASH]'
+is_format_valid 'user' 'ip46'
 
 # Checking user
 if [ ! -d "$HESTIA/data/users/$user" ]; then
@@ -42,6 +42,8 @@ if [ ! -d "$HESTIA/data/users/$user" ]; then
     exit 9
 fi
 
+is_password_valid
+
 # Checking empty password
 if [[ -z "$password" ]]; then
     echo "Error: password missmatch"