-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
member dn fetched from first ldap_2level request are not exactly the same of the second ldap request #474
Comments
Hi @gallak, |
NOTE I anonymized information but space are keeped
Extract of config file
Extract of log sympa ( verbose = 4)
thanks Soji |
@gallak, I couldn't figure out where is "double-space". Can you explain? |
well, my ldapsearch was done after my ldap correction . there is double space between "Leao" and "Susana" On the log ( which the log when the problem occurs) |
I could reproduce. use lib qw(/usr/share/sympa/lib);
use Sympa::Database;
my $dn = 'CN=De Oliveira Leao Susana,OU=Utilisateurs,OU=site1,DC=company,DC=com';
my $db = Sympa::Database->new('LDAP', host => 'localhost');
$db->connect;
print $db->canonical_dn($dn), "\n"; Result is:
After all, this behavior looks compliant to the standard: Some other directory servers (e.g. OpenLDAP, 389 DS) also look behaviing the same. Personally I think it would be better to modify DNs including multiple spaces instead of changing Sympa. |
In fact the canonical_dn method mustn't modify the DN because It's the LDAP server which keep DIT integrity inside user branch and inside group. So integrity of DN must be kept on Sympa side By the way, I 'm agree with you for multiple space, its better to modify it . But I think it was important to inform you about this behaviour thanks for your time, I let you decide what to do fix or not , but I think that it should be fix because DN integrity is not kept |
Indeed, this problem occurs with DNs under a single DIT. You say that, if AD is not compliant to standard, we should talk with it in uncompliant way. I'll investigate the way to prevent unwished canonicalization. Please wait for a while (some weeks to months). |
… for suffix2, it should not be canonicalized. Because some LDAP servers e.g. Active Directory don't conform to standard on matching rule and canonicalization might hurt integrity of DNs under the same DIT. See also GH issue sympa-community#474.
@gallak, I found solution is simple. Could you please check if this patch will solve the problem? Thanks. |
Version
We use the 6.2.32 from tarball
Installation method
installed from tarball on debian 9 server
Expected behavior
In case of a LDAP 2 level request, all the DN fetched must be the same as the DN used for the second request in order to get the e-mail address
Actual behavior
In my case I have an Active directory group with a user which contain a double space in the DN.
When I see this DN used to fetch the email address, the double space is transformed to a single space.
I saw it on log (loglevel 2)
So the real DN isn't correct and an error occurs!
Indeed, double space isn't a correct use of an ldap directory, but we could imagine that Sympa didn"t transform ldap DN
Additional information
The text was updated successfully, but these errors were encountered: