Update of /cvsroot/phpslash/phpslash-dev/include/modules/auth/authtypes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24346
Modified Files:
slashAuthLDAP.class
Log Message:
all attempts to fixed bugs failed... to be continued
Index: slashAuthLDAP.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/auth/authtypes/slashAuthLDAP.class,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** slashAuthLDAP.class 29 Oct 2004 06:08:35 -0000 1.7
--- slashAuthLDAP.class 29 Oct 2004 06:39:24 -0000 1.8
***************
*** 28,35 ****
*
*/
! function psl_passwd ($username,$password,$challenge)
{
$md5_pw = md5("$username:$password");
! $pw = md5("$md5_pw:$challenge");
return $pw;
}
--- 28,40 ----
*
*/
! function psl_passwd ($username,$password,$my_challenge="")
{
+ global $challenge;
+ if ( empty($my_challenge) )
+ {
+ $my_challenge = $challenge;
+ }
$md5_pw = md5("$username:$password");
! $pw = md5("$md5_pw:$my_challenge");
return $pw;
}
***************
*** 67,71 ****
$expected_response = md5("$md5_pw:$challenge");
! $response = $this->psl_passwd($username,$password,$challenge);
// compare the responses
--- 72,76 ----
$expected_response = md5("$md5_pw:$challenge");
! $response = $this->psl_passwd($username,$password);
// compare the responses
***************
*** 192,196 ****
if ( $is_user == true && $_PSL['LDAP_Register_Auth'] == true )
{
! // success
debug("user","user exists: registering with sql");
$ary = array ();
--- 197,202 ----
if ( $is_user == true && $_PSL['LDAP_Register_Auth'] == true )
{
! // successful - no errors
! $this->auth["error"] = "";
debug("user","user exists: registering with sql");
$ary = array ();
***************
*** 198,202 ****
$ary['username'] = $username; /** NOT NEEDED ? */
$ary['uname'] = $username; /** NOT NEEDED ? */
! $ary['password'] = $this->psl_passwd($username,$password,$challenge);
/** permissions TODO ask if this is right way? */
$perms = array('nobody'=>20,'user'=>21);
--- 204,209 ----
$ary['username'] = $username; /** NOT NEEDED ? */
$ary['uname'] = $username; /** NOT NEEDED ? */
! $ary['uid'] = $username; /** NOT NEEDED ? */
! $ary['password'] = $this->psl_passwd($username,$password);
/** permissions TODO ask if this is right way? */
$perms = array('nobody'=>20,'user'=>21);
***************
*** 207,210 ****
--- 214,220 ----
$this->auth["error"] = pslgetText("Could not register authenticated user in SQL db");
}
+ $this->auth['uid'] = $username;
+ $this->auth['perms'] = $this->get_userperms($username);
+
return true;
} else {
|