[Fusionforge-commits] r11433 - trunk/src/plugins/ldapextauth/include

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Sat Nov 6 21:46:39 CET 2010


Author: aljeux
Date: 2010-11-06 21:46:39 +0100 (Sat, 06 Nov 2010)
New Revision: 11433

Modified:
   trunk/src/plugins/ldapextauth/include/LdapExtAuthPlugin.class.php
Log:
No more quote problems in ldapextauth, remove hack.

Modified: trunk/src/plugins/ldapextauth/include/LdapExtAuthPlugin.class.php
===================================================================
--- trunk/src/plugins/ldapextauth/include/LdapExtAuthPlugin.class.php	2010-11-06 20:46:33 UTC (rev 11432)
+++ trunk/src/plugins/ldapextauth/include/LdapExtAuthPlugin.class.php	2010-11-06 20:46:39 UTC (rev 11433)
@@ -4,7 +4,7 @@
  * Copyright 2004 Roland Mas <roland at gnurandal.com> 
  *                The Gforge Group, LLC <http://gforgegroup.com/>
  * Copyright 2004 Christian Bayle <bayle at debian.org>
- * Copyright 2009 Alain Peyrat, Alcatel-Lucent
+ * Copyright 2009-2010 Alain Peyrat, Alcatel-Lucent
  * Copyright 2009 Chris Dalzell, OpenGameForge.org
  *
  * This file is part of FusionForge
@@ -146,16 +146,13 @@
 
 		debuglog("LDAP: dn=$dn");
 
-		// Prevent problem with php quoting.
-		$raw_passwd = get_magic_quotes_gpc() ? stripslashes($passwd) : $passwd;
-
 		$u = user_get_object_by_name ($loginname) ;
 
 		if ($u) {
 			debuglog("LDAP: User is present in database");
 
 			// User exists in DB
-			if (@ldap_bind($this->ldap_conn, $dn, $raw_passwd)) {
+			if (@ldap_bind($this->ldap_conn, $dn, $passwd)) {
 				debuglog("LDAP: ldap_bind() ok (user bind)");
 				// Password from form is valid in LDAP
 
@@ -172,7 +169,7 @@
 					return true ;
 				} else {
 					// Passwords mismatch, update DB's
-					$u->setPasswd ($raw_passwd) ;
+					$u->setPasswd ($passwd) ;
 					$GLOBALS['ldap_auth_failed']=false;
 					return true ;
 				}
@@ -195,7 +192,7 @@
 			debuglog("LDAP: User is not present in database\n");
 
 			// User doesn't exist in DB yet
-			if (@ldap_bind($this->ldap_conn, $dn, $raw_passwd))
+			if (@ldap_bind($this->ldap_conn, $dn, $passwd))
 			{
 
 				$ldapentry = $info[0] ;




More information about the Fusionforge-commits mailing list