diff --git a/docs/upgrades/upgrade_5.2.6-5.3.0.sql b/docs/upgrades/upgrade_5.2.6-5.3.0.sql index 3beb3b9bb..033730167 100644 --- a/docs/upgrades/upgrade_5.2.6-5.3.0.sql +++ b/docs/upgrades/upgrade_5.2.6-5.3.0.sql @@ -564,7 +564,9 @@ insert into international (internationalId,languageId,namespace,message,lastUpda alter table HttpProxy drop column cookiebox; delete from international where languageId=1 and namespace='HttpProxy' and internationalId=11; insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (11,1,'HttpProxy','The HTTP Proxy wobject is a very powerful tool. It enables you to embed external sites and applications into your site. For example, if you have a web mail system that you wish your staff could access through the intranet, then you could use the HTTP Proxy to accomplish that.\r\n\r\n

\r\n\r\nURL
\r\nThe starting URL for the proxy.\r\n

\r\n\r\nFollow redirects?
\r\nSometimes the URL to a page, is actually a redirection to another page. Do you wish to follow those redirections when they occur?\r\n

\r\n\r\nTimeout
\r\nThe amount of time (in seconds) that WebGUI should wait for a connection before giving up on an external page.\r\n

\r\n\r\nRemove style?
\r\nDo you wish to remove the stylesheet from the proxied content in favor of the stylesheet from your site?\r\n

\r\n\r\nFilter Content
\r\nChoose the level of HTML filtering you wish to apply to the proxied content.\r\n

\r\n\r\n\r\nAllow proxying of other domains?
\r\nIf you proxy a site like Yahoo! that links to other domains, do you wish to allow the user to follow the links to those other domains, or should the proxy stop them as they try to leave the original site you specified?\r\n

\r\n', 1053774887,NULL); - +delete from international where languageId=1 and namespace='Auth/LDAP' and internationalId=9; +insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (9,1,'Auth/LDAP','User RDN', 1053777552,'Specifying the relative distinguished name to authenticate a user against an LDAP directory.'); +insert into settings values ("ldapUserRDN","cn"); diff --git a/lib/WebGUI/Authentication/LDAP.pm b/lib/WebGUI/Authentication/LDAP.pm index 3e322dc95..572ee0d3a 100644 --- a/lib/WebGUI/Authentication/LDAP.pm +++ b/lib/WebGUI/Authentication/LDAP.pm @@ -112,7 +112,7 @@ sub registrationFormSave { $ldap->bind; my $search = $ldap->search (base => $uri->dn, filter => $session{setting}{ldapId}."=".$session{form}{'authLDAP.ldapId'}); if (defined $search->entry(0)) { - $connectDN = $search->entry(0)->get_value("cn"); + $connectDN = $search->entry(0)->get_value($session{setting}{ldapUserRDN}); } $ldap->unbind; WebGUI::Authentication::saveParams($uid,'LDAP', @@ -130,7 +130,7 @@ sub registrationFormValidate { if ($ldap->bind) { $search = $ldap->search (base=>$uri->dn,filter=>$session{setting}{ldapId}."=".$session{form}{'authLDAP.ldapId'}); if (defined $search->entry(0)) { - $connectDN = $search->entry(0)->get_value("cn"); + $connectDN = $search->entry(0)->get_value($session{setting}{ldapUserRDN}); $ldap->unbind; $ldap = Net::LDAP->new($uri->host, (port=>$uri->port)) or $error .= WebGUI::International::get(2,'Auth/LDAP'); $auth = $ldap->bind(dn=>$connectDN, password=>$session{form}{'authLDAP.ldapPassword'}); @@ -163,6 +163,7 @@ sub settingsForm { my $f; $f = WebGUI::HTMLForm->new; $f->readOnly(''.optionsLabel().''); + $f->url("ldapUserRDN",WebGUI::International::get(9,'Auth/LDAP'),$session{setting}{ldapUserRDN}); $f->url("ldapURL",WebGUI::International::get(5,'Auth/LDAP'),$session{setting}{ldapURL}); $f->text("ldapId",WebGUI::International::get(6,'Auth/LDAP'),$session{setting}{ldapId}); $f->text("ldapIdName",WebGUI::International::get(7,'Auth/LDAP'),$session{setting}{ldapIdName});