Commit b78e3e56 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixed ACL assignment check for empty member list

Showing with 11 additions and 1 deletion
+11 -1
...@@ -141,7 +141,12 @@ class acl ...@@ -141,7 +141,12 @@ class acl
foreach ($ma as $memberdn) { foreach ($ma as $memberdn) {
// Check for wildcard here // Check for wildcard here
$dn = base64_decode($memberdn); $dn = base64_decode($memberdn);
if ($dn != "*") { if ($dn != '*') {
if (empty($dn)) {
trigger_error('Empty dn found in members of ACL');
continue;
}
$ldap->cat($dn, array('cn', 'objectClass', 'description', 'uid')); $ldap->cat($dn, array('cn', 'objectClass', 'description', 'uid'));
/* Found entry... */ /* Found entry... */
......
...@@ -156,6 +156,11 @@ class ACLsAssignmentDialog extends GenericDialog ...@@ -156,6 +156,11 @@ class ACLsAssignmentDialog extends GenericDialog
function handle_finish () function handle_finish ()
{ {
$this->dialog->save_object(); $this->dialog->save_object();
$messages = $this->dialog->check();
if (!empty($messages)) {
msg_dialog::displayChecks($messages);
return $this->dialog->execute();
}
$this->attribute->addValue($this->dialog->getAclEntry()); $this->attribute->addValue($this->dialog->getAclEntry());
return FALSE; return FALSE;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment