Skip to content

Commit 58ba3a0

Browse files
committed
Solve issues with password validation
1 parent e8671d3 commit 58ba3a0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bin/v-check-user-password

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
user=$1
1515
password=$2; HIDE=2
1616
ip46=${3-127.0.0.1}
17-
return_hash=${4-no}
17+
return_hash=$4
1818

1919
# Includes
2020
# shellcheck source=/etc/hestiacp/hestia.conf
@@ -32,8 +32,8 @@ date=$(echo "$time_n_date" |cut -f 2 -d \ )
3232
# Verifications #
3333
#----------------------------------------------------------#
3434

35-
check_args '2' "$#" 'USER PASSWORD [ip] [RETURN_HASH]'
36-
is_format_valid 'user' 'password' 'ip46'
35+
check_args '2' "$#" 'USER PASSWORD [IP] [RETURN_HASH]'
36+
is_format_valid 'user' 'ip46'
3737

3838
# Checking user
3939
if [ ! -d "$HESTIA/data/users/$user" ]; then
@@ -42,6 +42,8 @@ if [ ! -d "$HESTIA/data/users/$user" ]; then
4242
exit 9
4343
fi
4444

45+
is_password_valid
46+
4547
# Checking empty password
4648
if [[ -z "$password" ]]; then
4749
echo "Error: password missmatch"

0 commit comments

Comments
 (0)