Auth fix 0.9.8-20

This commit is contained in:
Serghey Rodin 2018-04-09 00:44:32 +03:00
commit eaf9d89096
6 changed files with 383 additions and 64 deletions

View file

@ -278,6 +278,15 @@ is_password_valid() {
fi
}
# Check if hash is transmitted via file
is_hash_valid() {
if [[ "$hash" =~ ^/tmp/ ]]; then
if [ -f "$hash" ]; then
hash="$(head -n1 $hash)"
fi
fi
}
# Get object value
get_object_value() {
object=$(grep "$2='$3'" $USER_DATA/$1.conf)