Rollback de r4494
This commit is contained in:
parent
137eee0274
commit
f12bbd53d2
|
@ -510,7 +510,7 @@ class m_admin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$login=strtolower($login);
|
$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"));
|
$err->raise("admin", _("Login can only contains characters a-z and 0-9"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ while getopts "l:u:f:d:" optname
|
||||||
do
|
do
|
||||||
case "$optname" in
|
case "$optname" in
|
||||||
"l")
|
"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'"
|
query="SELECT uid,login FROM membres WHERE login LIKE '$OPTARG'"
|
||||||
else
|
else
|
||||||
echo "Bad login provided"
|
echo "Bad login provided"
|
||||||
|
|
|
@ -68,7 +68,7 @@ echo $uid
|
||||||
# Return the html path for a account name
|
# Return the html path for a account name
|
||||||
get_html_path_by_name() {
|
get_html_path_by_name() {
|
||||||
local name="$1"
|
local name="$1"
|
||||||
if [[ ! "$name" =~ ^([a-z0-9\-]+)$ ]] ; then
|
if [[ ! "$name" =~ ^([a-z0-9]+)$ ]] ; then
|
||||||
# Error on error flux
|
# Error on error flux
|
||||||
echo "Account name is incorrect." >&2
|
echo "Account name is incorrect." >&2
|
||||||
exit 2
|
exit 2
|
||||||
|
|
Loading…
Reference in New Issue