forked from Wavyzz/dolibarr
Fix Improper Authorization Check reported by Ahsan Aziz.
This commit is contained in:
@@ -1280,6 +1280,10 @@ class User extends CommonObject
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login"));
|
||||
return -1;
|
||||
} elseif (preg_match('/[,@<>"\']/', $this->login)) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans("ErrorBadCharIntoLoginName");
|
||||
return -1;
|
||||
}
|
||||
|
||||
$this->datec = dol_now();
|
||||
@@ -1669,6 +1673,10 @@ class User extends CommonObject
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans("ErrorFieldRequired", 'Login');
|
||||
return -1;
|
||||
} elseif (preg_match('/[,@<>"\']/', $this->login)) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans("ErrorBadCharIntoLoginName");
|
||||
return -1;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
Reference in New Issue
Block a user