From 5bffb4177cdd58bc9fbdcea49f9325f63427a211 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Fri, 21 Nov 2014 11:29:41 +1000 Subject: [PATCH] * LDV::LDAP : tweaks --- lib/LDV/LDAP.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;