Exported variable name vs LDAP attr name
I just noticed a problem with exported variables, to be more precise, one exported variable.
For some reason, I've created a non standard LDAP schema to add a preferredMail attribute. This attr use the same syntaxe as the standard mail one, but only accept one value. Each user object also has the standard mail attr which can have several values. For example:
uid=dani,ou=Users,dc=firewall-services,dc=com [...] mail: daniel@firewall-services.com mail: dani@firewall-services.com mail: contact@vroom.im mail: daniel.berteaud@firewall-services.com mail: daniel_berteaud@firewall-services.com mail: tech@firewall-services.com [...] preferredMail: daniel@firewall-services.com [...]
In LL::NG, I've added an exported variable like this:
mail => preferredMail
So I can then use the $mail variable which is guaranteed to have only one value.
This worked like a charm until LL::NG 1.4.1 (probably introduced in 1.4.0, but I haven't used that version).
Now, in 1.4.1, my $mail variable contains all the values of the mail LDAP attr (instead of preferredMail)
If I add another exported var:
testmail => preferredMail
It's working, I get the single value of the preferredMail attr. So, I'm not really sure where the problem is, but it looks like if we name a variable the same as an existing LDAP attr, LL::NG uses that directly instead of using the attr name we have defined