[phpldapadmin] [ phpldapadmin-Bugs-2958613 ] password_checker.php md5crypt explode() function bug

"SourceForge.net" <[email protected]> Tue, 16 Nov 2010 09:21:53 +0000
Newsgroups gmane.comp.ldap.davedap
Message-ID <[email protected]>
Bugs item #2958613, was opened at 2010-02-25 20:33
Message generated for change (Comment added) made by wurley
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=2958613&group_id=61828

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 1.2.x
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Hyungmin Park (kemenatar)
Assigned to: Nobody/Anonymous (nobody)
Summary: password_checker.php md5crypt explode() function bug

Initial Comment:
Dear developers,

I encountered some bugs from htdocs/password_checker.php and lib/functions.php files.
My server configurations are as follow:
phpLDAPAdmin version 1.2.0.5
OpenLDAP Server 2.4.14
php5-ldap 5.2.12
Apache 2.2.24
FreeBSD 7.0 STABLE

Here's the detail:

In the file "lib/functions.php", line around 2299:

list($type, $salt, $hash) = explode('$', $cryptedpassword);
But, the variable $cryptedpassword contains something like '$1$blahblah$iwannabeapopstar'
Therefore, the value $type would contain '',
$salt would contain 1 and $hash would be 'blahblah'.

The expected values are:
$type = "1", $salt="blahblah" and, $hash="iwannabeapopstar".

So, I guess that the code should fixed like this:

list($dummy, $type, $salt, $hash) = explode('$', ..........).

That's all.
Have a nice day.


----------------------------------------------------------------------

>Comment By: Deon George (wurley)
Date: 2010-11-16 20:21

Message:
Thanks, fixed with commit #6fdab2c

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=2958613&group_id=61828

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
______________________________________
phpLDAPadmin development mailing list.
To unsbuscribe: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
http://phpldapadmin.sourceforge.net/