X-Git-Url: http://git.rot13.org/?p=virtual-ldap;a=blobdiff_plain;f=bin%2Fldap-rewrite.pl;h=6d2fa2db87da71628e3233acbd58a2867825c409;hp=d3d8da0c2cd177304a55e9c064f528f2ffc9236e;hb=c75987aa13f55b938c8bbbe3b2685be29fc9deb2;hpb=cc919bb8c5863d65db2cab4a7937521ba3ba5e28 diff --git a/bin/ldap-rewrite.pl b/bin/ldap-rewrite.pl index d3d8da0..6d2fa2d 100755 --- a/bin/ldap-rewrite.pl +++ b/bin/ldap-rewrite.pl @@ -108,12 +108,11 @@ sub log_response { foreach my $type ( keys %$data ) { my $vals = $data->{$type}; - $vals =~ s{#\s*$}{}; - - my @vals = split(/\s*#\s*/, $vals); - push @{ $response->{protocolOp}->{searchResEntry}->{attributes} }, - { type => $config->{overlay_prefix} . $type, vals => [ @vals ] }; + push @{ $response->{protocolOp}->{searchResEntry}->{attributes} }, { + type => $config->{overlay_prefix} . $type, + vals => ref($vals) eq 'ARRAY' ? $vals : [ $vals ], + }; } }