Enforce minimum password quality
This commit is contained in:
parent
344c87b2f2
commit
74c3bc2578
|
@ -418,12 +418,12 @@ function interactive_configuration_remote_backups {
|
||||||
$remote_ssh_port != "" && \
|
$remote_ssh_port != "" && \
|
||||||
$remote_ssh_password != "" ]]; then
|
$remote_ssh_password != "" ]]; then
|
||||||
|
|
||||||
if [ ${#remote_ssh_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then
|
if [ ${#remote_ssh_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then
|
||||||
dialog --title "Password quality check" --msgbox "The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40
|
dialog --title "Password quality check" --msgbox "The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40
|
||||||
else
|
else
|
||||||
echo "$remote_ssh_username@$remote_ssh_domain:$remote_ssh_port//home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST
|
echo "$remote_ssh_username@$remote_ssh_domain:$remote_ssh_port//home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST
|
||||||
entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1))
|
entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1))
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
entering_remote_backups_done="yes"
|
entering_remote_backups_done="yes"
|
||||||
fi
|
fi
|
||||||
|
@ -617,6 +617,10 @@ function interactive_configuration {
|
||||||
1) exit 0;;
|
1) exit 0;;
|
||||||
255) exit 0;;
|
255) exit 0;;
|
||||||
esac
|
esac
|
||||||
|
if [ ${#DDNS_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
|
||||||
|
dialog --title "Password quality check" --msgbox "The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40
|
||||||
|
DDNS_PASSWORD=""
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
while [ ! $MY_NAME ]
|
while [ ! $MY_NAME ]
|
||||||
|
|
Loading…
Reference in New Issue