diff --git a/lib/LDV/LDAP.pm b/lib/LDV/LDAP.pm index 99a7202..af9bc8e 100644 --- a/lib/LDV/LDAP.pm +++ b/lib/LDV/LDAP.pm @@ -101,7 +101,6 @@ sub get { utf8::decode($data->{$attr}); } - delete $data->{userPassword}; delete $data->{objectClass}; return $data; } @@ -123,7 +122,8 @@ sub update { my @chg = (); while (my ($key, $value) = each(%$attrs)) { next unless exists $allowed{$key}; - next if ($key eq 'uid'); # rename protection + next if ($key =~ m/uid/); # rename protection + next if ($key =~ m/objectClass/); # class protection if ($value and not exists $data->{$key}) { push @chg, add => [$key => $value]; next;