Failure message for short passwords
This commit is contained in:
parent
08039edf3b
commit
50fb913747
|
@ -201,11 +201,10 @@ function change_password_searx {
|
||||||
new_username="$1"
|
new_username="$1"
|
||||||
new_user_password="$2"
|
new_user_password="$2"
|
||||||
|
|
||||||
${PROJECT_NAME}-pass -u $new_username -a searx -p "$new_user_password"
|
|
||||||
|
|
||||||
if grep -q "$new_username:" /etc/nginx/.htpasswd; then
|
if grep -q "$new_username:" /etc/nginx/.htpasswd; then
|
||||||
sed -i "/$new_username:/d" /etc/nginx/.htpasswd
|
sed -i "/$new_username:/d" /etc/nginx/.htpasswd
|
||||||
echo "$new_user_password" | htpasswd -i -s -c /etc/nginx/.htpasswd $new_username
|
echo "$new_user_password" | htpasswd -i -s -c /etc/nginx/.htpasswd $new_username
|
||||||
|
${PROJECT_NAME}-pass -u $curr_username -a searx -p "$new_user_password"
|
||||||
echo '0'
|
echo '0'
|
||||||
fi
|
fi
|
||||||
echo '1'
|
echo '1'
|
||||||
|
|
|
@ -229,6 +229,9 @@ function view_or_change_passwords {
|
||||||
change_password_${SELECTED_APP} ${SELECTED_USERNAME} "${CURR_PASSWORD}"
|
change_password_${SELECTED_APP} ${SELECTED_USERNAME} "${CURR_PASSWORD}"
|
||||||
dialog --title $"Change password" \
|
dialog --title $"Change password" \
|
||||||
--msgbox $"The password was changed" 6 40
|
--msgbox $"The password was changed" 6 40
|
||||||
|
else
|
||||||
|
dialog --title $"Change password" \
|
||||||
|
--msgbox $"The password given must be at least 8 characters" 6 40
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue