[phpldapadmin] [ phpldapadmin-Bugs-1925203 ] Sun Java System DS compatible SSHA

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.ldap.davedap
Message-ID <[email protected]>
Bugs item #1925203, was opened at 2008-03-26 01:04
Message generated for change (Comment added) made by wurley
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=1925203&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.1.x
Status: Closed
Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Oleg Smirnov (oleg_smirnov)
Assigned to: Nobody/Anonymous (nobody)
Summary: Sun Java System DS compatible SSHA

Initial Comment:
phpLDAPadmin 1.1.0.5 unable to check passwords stored in Sun Java System DS 5.2 (formely Sun One DS) SSHA format. The attached patch attempts to correct its behavior.

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

Comment By: Deon George (wurley)
Date: 2008-12-01 16:24

Message:
I dont have Sun DS :)

I have tested SSHA to an openldap server.

Actually, I've looked in more detail in your patch, and it does exactly
the same as before (just a differnet way) - so why isnt it working for you?

The old code, picked out the salt, re-generated the password from the user
provided details (using the salt), base64 encoded, and compared that to
text that would have been in LDAP.

Your patch, picked out the salt, re-generated the password, and compares
that to unsalted (binary) password (extracted from the entry in LDAP). The
only difference is base64_encoding and the (string) comparison.

Can you enable the old code, with your patch and add (after the evaluation
of nhash):
debug_dump(
array('salt'=>$salt,
'new_hash'=>$new_hash,
'osalt'=>$osalt,
'ohash'=>$ohash,
'nhash'=>$nhash,
'crypted'=>$cryptedpassword,
'hash'=>$hash,
'strlen'=>strlen($hash)),1);

Then do your password compare popup with the correct password. 

It should show (even though some will be binary):
* salt and osalt are the same
* ohash and nhash ar e the same
* crypted and new_hash are the same
* hash is the same as nhash or ohash with osalt or salt on the end.

What is different?

EG:
Array
(
    [salt] => U3�
    [new_hash] => Jv8eCLhIzJcuBOw9daXrNgBcvvBVGjON
    [osalt] => U3�
    [ohash] => &��H̗.�=u��6�\��
    [nhash] => &��H̗.�=u��6�\��
    [crypted] => Jv8eCLhIzJcuBOw9daXrNgBcvvBVGjON
    [hash] => &��H̗.�=u��6�\��U3�
    [strlen] => 24
)


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

Comment By: Oleg Smirnov (oleg_smirnov)
Date: 2008-12-01 04:58

Message:
Could you tell me what version of Sun DS are you using?

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

Comment By: Deon George (wurley)
Date: 2008-11-28 21:23

Message:
I havent applied your patch.

I've tested SSHA password with PLA and they work ?

IE: I created a password with slappasswd, and with that password I was
able to bind to LDAP natively, login to LDAP as well as check the password
with the password checker.

So I'm not sure why this patch is needed? Let me know if you think it
should be included - I need to know what is wrong with the current code...

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

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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
______________________________________
phpLDAPadmin development mailing list.
To unsbuscribe: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
http://phpldapadmin.sourceforge.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.