Fixed validation so LDAPLink takes ldap:// and ldaps:// URIs.

Net::LDAP does The Right Thing (tm) when given an ldaps:// URI
provided the administrator has properly set up /etc/ldap/ldap.conf
with the CA Cert signing the Server's certificate.

Succesfully tested

ldap://my.ldap.server/
ldap://my.ldap.server:389/  (with and without TLS)
ldaps://my.ldap.server/
ldaps://my.ldap.server:636/

This patch should be backported to 7.5 :-)
This commit is contained in:
Ernesto Hernández-Novich 2008-10-12 18:40:22 +00:00
parent b6f260d210
commit 01a5ebfbe2

View file

@ -118,7 +118,7 @@ sub validateForm {
}
# Check format of ldapUrl
push(@{$errors}, $i18n->get("ldap url malformed")) unless ($formFields->{ldapUrl} =~ m!^ldap://.*!);
push(@{$errors}, $i18n->get("ldap url malformed")) unless ($formFields->{ldapUrl} =~ m!^ldaps?://.*!);
# Other checks here