Chris Ridd wrote:

However, you do know that there's no need to base64 encode attribute values
in LDAP? LDAP's a binary protocol. The only use of base64 is when writing
certain unsafe values to LDIF *files*, and (curiously) in some hashed
password mechanisms.

Hi,
Thanks for the reply. Somehow, I was under the impression that attribute values were already base64 encoded inside of the entry result set, but I was simply wrong. I think it had something to do with the fact that I am used to seeing password values base64 encoded...

 I created a test entry with the following:

memberUid: foo
memberUid: bar
memberUid: big
memberUid: tämä
memberUid: ää-mike-ää
memberUid: bigfoo


The following code works fine for matching all values, even the ones which would be base64 encoded when dumped to LDIF:

------------
for my $entry (@entries) {
  my @vals = $entry->get_value('memberUID');

  for (@vals) {
    if (/mike/) {
       print "match: $_\n";
    } else {
       print "no match: $_\n";
    }
  }
}
------------

no match: foo
no match: bar
no match: big
no match: tämä
match: ää-mike-ää
no match: bigfoo


--
mike

Reply via email to