more password protection; adapt regex

This commit is contained in:
2015-07-10 14:58:30 +03:00
parent be106959d1
commit ccb634708d
2 changed files with 3 additions and 4 deletions

View File

@@ -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"

View File

@@ -1 +0,0 @@
password ' ls -R