Allowing only Letters and numberes on sql password
This commit is contained in:
parent
7099ef1081
commit
1f13677bc1
|
@ -36,7 +36,10 @@ $fields = array (
|
|||
getFields($fields);
|
||||
|
||||
$mysql->change_user_password($id,$password,$passwordconf);
|
||||
|
||||
include("sql_users_list.php");
|
||||
|
||||
$error=$err->errstr();
|
||||
if(isset($error) && $error){
|
||||
include("sql_users_password.php");
|
||||
}else{
|
||||
include("sql_users_list.php");
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -696,6 +696,10 @@ class m_mysql {
|
|||
|
||||
$usern=trim($usern);
|
||||
$user=addslashes($usern);
|
||||
if(!preg_match("#^[0-9a-zA-Z_]*$#",$password)) {
|
||||
$err->raise("mysql",_("Database password can contain only letters numbers and underscore."));
|
||||
return false;
|
||||
}
|
||||
$pass=addslashes($password);
|
||||
if ($password != $passconf || !$password) {
|
||||
$err->raise("mysql",_("The passwords do not match."));
|
||||
|
|
Loading…
Reference in New Issue