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);
|
getFields($fields);
|
||||||
|
|
||||||
$mysql->change_user_password($id,$password,$passwordconf);
|
$mysql->change_user_password($id,$password,$passwordconf);
|
||||||
|
$error=$err->errstr();
|
||||||
include("sql_users_list.php");
|
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);
|
$usern=trim($usern);
|
||||||
$user=addslashes($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);
|
$pass=addslashes($password);
|
||||||
if ($password != $passconf || !$password) {
|
if ($password != $passconf || !$password) {
|
||||||
$err->raise("mysql",_("The passwords do not match."));
|
$err->raise("mysql",_("The passwords do not match."));
|
||||||
|
|
Loading…
Reference in New Issue