Check password length
This commit is contained in:
parent
74101c3df1
commit
df1c11802d
|
@ -55,6 +55,9 @@ CONFIG_FILENAME=
|
||||||
|
|
||||||
DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.local"
|
DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.local"
|
||||||
|
|
||||||
|
# Minimum number of characters in a password
|
||||||
|
MINIMUM_PASSWORD_LENGTH=10
|
||||||
|
|
||||||
while [[ $# > 1 ]]
|
while [[ $# > 1 ]]
|
||||||
do
|
do
|
||||||
key="$1"
|
key="$1"
|
||||||
|
@ -83,6 +86,10 @@ case $key in
|
||||||
-p|--password)
|
-p|--password)
|
||||||
shift
|
shift
|
||||||
PASSWORD="$1"
|
PASSWORD="$1"
|
||||||
|
if [ ${#PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
|
||||||
|
echo "Your password chould contain at least ${MINIMUM_PASSWORD_LENGTH} characters"
|
||||||
|
exit 3628
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
-s|--size)
|
-s|--size)
|
||||||
shift
|
shift
|
||||||
|
|
Loading…
Reference in New Issue