diff --git a/bureau/class/m_admin.php b/bureau/class/m_admin.php index f13aa0bf..a821d6b1 100644 --- a/bureau/class/m_admin.php +++ b/bureau/class/m_admin.php @@ -510,7 +510,7 @@ class m_admin { } } $login=strtolower($login); - if (!preg_match("#^[a-z0-9\-]+$#",$login)) { //$ + if (!preg_match("#^[a-z0-9]+$#",$login)) { //$ $err->raise("admin", _("Login can only contains characters a-z and 0-9")); return false; } diff --git a/src/fixperms.sh b/src/fixperms.sh index e965f5f4..7a81ee9f 100755 --- a/src/fixperms.sh +++ b/src/fixperms.sh @@ -42,7 +42,7 @@ while getopts "l:u:f:d:" optname do case "$optname" in "l") - if [[ "$OPTARG" =~ ^[a-zA-Z0-9_\-]+$ ]] ; then + if [[ "$OPTARG" =~ ^[a-zA-Z0-9_]+$ ]] ; then query="SELECT uid,login FROM membres WHERE login LIKE '$OPTARG'" else echo "Bad login provided" diff --git a/src/functions.sh b/src/functions.sh index c4d46795..e1d576a1 100755 --- a/src/functions.sh +++ b/src/functions.sh @@ -68,7 +68,7 @@ echo $uid # Return the html path for a account name get_html_path_by_name() { local name="$1" - if [[ ! "$name" =~ ^([a-z0-9\-]+)$ ]] ; then + if [[ ! "$name" =~ ^([a-z0-9]+)$ ]] ; then # Error on error flux echo "Account name is incorrect." >&2 exit 2