LSldapObject::submitChange(): Add security check about isNew() return

This commit is contained in:
Benjamin Renard 2020-12-22 19:45:35 +01:00
parent 06b8fddc51
commit a353ca5c37

View file

@ -634,6 +634,8 @@ class LSldapObject extends LSlog_staticLoggerClass {
public function submitChange($idForm) {
$submitData=array();
$new = $this -> isNew();
if (!$new && $idForm == 'create')
self :: log_fatal("submitChange($idForm): object isn't considered as new !?");
foreach($this -> attrs as $attr) {
if(($attr -> isUpdate())&&($attr -> isValidate())) {
if(($attr -> name == $this -> getConfig('rdn')) && (!$new)) {