This topic is locked

MD5 in Joomla

8/14/2007 6:58:56 PM
PHPRunner General questions
M
maxcolo author

Hi, sorry for my english I italian member,

I use PHP Runner 4.1 Build 288 is very, very good program. One question
I use Joomla CMS , the table jos_user in database have username e password (criptata con MD5).

When I do login with PHP runner I have error on password (login incorrect), I have read more topic for this agument, but have not solution for this problem.
Example
jos_user stored in database username=admin password=admin (MD5)
I want login with php runner username=admin password=admin (no......ser345tfredsr5487hytree ecc......)

You have solution for me

Best regards at all Staff of wonderful program

Tanck's

Max

J
Jane 8/15/2007

Max,
you need to check off Encrypt passwords option on the User login settings dialog on the Security tab in the PHPRunner.

M
maxcolo author 8/17/2007

Max,

you need to check off Encrypt passwords option on the User login settings dialog on the Security tab in the PHPRunner.


Hi Jane,

it work with Jommla 1.012 use this option in login user

[codebox] mosMakeHtmlSafe($row);
if (isset($_POST['password']) && $_POST['password'] != '') {

if (isset($_POST['verifyPass']) && ($_POST['verifyPass'] == $_POST['password'])) {

$row->password = md5(trim($row->password));

} else {

echo "<script> alert(\"".addslashes( _PASS_MATCH )."\"); window.history.go(-1); </script>\n";

exit();

}

} else {

// Restore 'original password'

$row->password = $orig_password;

}[/codebox]
But not work with Joomla 1.013 (new update) use this code:
[codebox] mosMakeHtmlSafe($row);
if (isset($_POST['password']) && $_POST['password'] != '') {

if (isset($_POST['verifyPass']) && ($_POST['verifyPass'] == $_POST['password'])) {

$row->password = trim($row->password);

$salt = mosMakePassword(16);

$crypt = md5($row->password.$salt);

$row->password = $crypt.':'.$salt;

} else {

echo "<script> alert(\"".addslashes( _PASS_MATCH )."\"); window.history.go(-1); </script>\n";

exit();

}

} else {

// Restore 'original password'[/codebox]
You have new solution for this?

So much

Massimo

rsawchuk 8/19/2007

Joomla 1.013 changed their encryption method from previous versions; they are no longer using MD5. This has messed up integration with many programs and users are not happy with this.
You will need to hack your code (don't have a clue to what) if you want to use the 1.013 jos_users table in your PHPRunner applications.
If anyone finds a solution or work-around, I would be interested in hearing about it. Thanks.
Russ