more password protection; adapt regex
This commit is contained in:
@@ -45,7 +45,7 @@ function checkaction {
|
||||
}
|
||||
|
||||
function checkuser {
|
||||
REGEX="^[A-Za-z0-9._+-]+$"
|
||||
REGEX="^[A-Za-z0-9._+-]+$" # Allowed symbols
|
||||
if [[ $1 =~ $REGEX ]]; then
|
||||
echo "true"
|
||||
else
|
||||
@@ -54,8 +54,8 @@ function checkuser {
|
||||
}
|
||||
|
||||
function checkpass {
|
||||
REGEX="^[A-Za-z0-9.\"§$/%&\(\)=@:;#*_+-]+$"
|
||||
if [[ $1 =~ $REGEX ]]; then
|
||||
REGEX="[ 'x\\]" # Not allowed symbols
|
||||
if [[ ! "$1" =~ $REGEX ]]; then
|
||||
echo "true"
|
||||
else
|
||||
echo "false"
|
||||
|
||||
Reference in New Issue
Block a user