This topic is locked
[SOLVED]

 password encryption in users table

2/22/2008 5:18:40 PM
PHPRunner General questions
B
bigbarruda author

Any help is gratefully received.
I am trying to use the users table from a punBB install as my login table for a PHPRunner generated site, and I'm not having much success.
punBB uses SHA1 encryption on the password field, so the passwords are all listed as long hex strings, e.g. '5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8'
I have searched through the forums here and tried various possible solutions with no success.
I'm running a MySql 5.0.45 database on Apache 2.2.8...
As I said above, any help will be gratefully received...

Admin 2/26/2008

Hi,
I recommend you to try the following.

Check off Encrypt password option in User login settingsdialog on the Securitytab in PHPRunner.

Then build the pages and open generated login.phpfile with a text editor.

Find this line there:

$strPassword=md5($strPassword);



try to replace it with:

$strPassword=sha1($strPassword);



or with:

$strPassword=strtoupper(sha1($strPassword));

B
bigbarruda author 2/27/2008

Changing that code in the login.php file makes no difference. I still get 'invalid login'.
I have read in various previous posts that talk about changing the line specified.
Which is one of the reason I started a new thread regarding it.
Does version 4.2 handle sha1 password hashes?

Admin 2/28/2008

Hi,
We don't plan to add sha1 feature.

You can easily implement it in generated files as I showed you before.
I suppose punBB uses more complex password encryption scheme than just sha1 coding.

Unfortunatelly I don't know how punBB authentication works and can not provide you more help here.

S
steveh 3/20/2008

It would be a useful enhancement if you could add an option to the login config for custom code here (like the custom format code on screens and reports etc).
That would save the manual edits?

Admin 3/20/2008

Steve,
sure, you can use BeforeLogin event to put your custom login procedure there.

S
steveh 3/20/2008

It looks as though the before login event is missign a value, it needs strSQL passed in to be able to affect that?
Or am I missing something? (Probably!)

O
olegsg 10/29/2009

How to change HASH function in PHPRunner 5.1 ? (Can't find $strPassword=md5($strPassword); in login.php file)

Admin 10/29/2009

Olegsg,
make sure 'Password encryption' option is turned on in PHPRunner.

O
olegsg 11/2/2009



Olegsg,
make sure 'Password encryption' option is turned on in PHPRunner.


Thank you, it works.