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