mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-27 09:40:10 +00:00
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:
parent
9de9f84ff0
commit
4a5804a24c
2 changed files with 20 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue