From: <ru...@us...> - 2009-07-24 06:18:22
|
Revision: 7048 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7048&view=rev Author: rurban Date: 2009-07-24 06:18:16 +0000 (Fri, 24 Jul 2009) Log Message: ----------- trim spaces from usernames as LDAP does it internally be more paranoid about * in usernames Modified Paths: -------------- trunk/lib/WikiUser/LDAP.php Modified: trunk/lib/WikiUser/LDAP.php =================================================================== --- trunk/lib/WikiUser/LDAP.php 2009-07-24 06:12:19 UTC (rev 7047) +++ trunk/lib/WikiUser/LDAP.php 2009-07-24 06:18:16 UTC (rev 7048) @@ -119,6 +119,7 @@ function checkPass($submitted_password) { $this->_authmethod = 'LDAP'; + $this->_userid = trim($this->_userid); $userid = $this->_userid; if (!$this->isValidName()) { trigger_error(_("Invalid username."), E_USER_WARNING); @@ -202,12 +203,13 @@ function userExists() { + $this->_userid = trim($this->_userid); $userid = $this->_userid; - /*if (strstr($userid, '*')) { + if (strstr($userid, '*')) { trigger_error(fmt("Invalid username '%s' for LDAP Auth", $userid), E_USER_WARNING); return false; - }*/ + } if ($ldap = $this->_init()) { // Need to set the right root search information. see ../index.php $st_search = $this->_searchparam($userid); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |