Multiple fixes and Shellcheck complaiance

fixes for Issue #1306, qrcode now defaults to ansiutf8,
added flag -a256 or --ansi256 if their fonts are having trouble

Shellcheck compliance #1233 for qrcodeCONF.sh,
LIST array is now created with mapfile instead
quoted multiple variables.

fixes for Issue #1307, User creation won't allow user creation with name
starting with "-", qrcodeCONF.sh won't accept wrong options or users starting with "-"
and exit with error code 1
This commit is contained in:
4s3ti 2021-05-08 15:51:27 +02:00
parent 9de9f84ff0
commit 4a5804a24c
2 changed files with 20 additions and 6 deletions

View file

@ -64,6 +64,11 @@ if [[ "${CLIENT_NAME}" =~ [^a-zA-Z0-9.@_-] ]]; then
exit 1
fi
if [[ "${CLIENT_NAME:0:1}" == "-" ]]; then
echo "Name cannot start with -"
exit 1
fi
if [[ "${CLIENT_NAME}" =~ ^[0-9]+$ ]]; then
echo "Names cannot be integers."
exit 1