eZ Community » Forums » Developer » Documentation not correct for md5...
expandshrink

Documentation not correct for md5 hashing?

Documentation not correct for md5 hashing?

Friday 22 September 2006 1:50:36 pm - 7 replies

According to hash_type in site.ini and documentation for md5_user, the password_hash is generated by concatenating login, password, but this can not be. I testet to make an md5 hash out of my login+pass, but they don't match my password_hash in the ezuser table.

Why? Is there anything missing in the docs here, or does md5_user contain more values to hash?

Modified on Friday 22 September 2006 1:52:35 pm by K259

Friday 22 September 2006 2:18:45 pm

Hi K259

Google is definitely your friend. As my Perl knowledge is rudimentary at best I don't know how useful these tips are, but this is a common problem.

http://lu.php.net/manual/en/function.md5.php#31238
http://www.jaguarpc.com/forums/showthread.php?p=100421

and
There is no such thing as incompatibility between different implementation of MD5. There only one MD5 in the world. Probably, you want to $digest = $ctx->hexdigest; in perl.

(No clue what it means, I hope it helps you)

Greetings from Luxembourg

Claudia

Friday 22 September 2006 2:21:16 pm

Hi K

md5_user:
$str = md5( "$user\n$password" );

md5_site:
$str = md5( "$user\n$password\n$site" );

md5_password:
$str = md5( $password );

(taken from kernel/classes/datatypes/ezuser/ezuser.php)

Friday 22 September 2006 2:26:48 pm

This:
md5_site:
$str = md5( "$user\n$password\n$site" );

What if I got a letter ö in the SiteName under settings/site.ini.

I have a sql-statement which don't take this variable because there's an error on the site variabel.

I tried: $str = md5( "$user\n$password\n"xxxöxxx"" ); But I can't enter this ö in the script (VI editor), it won't allow me.

Any ideas how I can get around this? When SiteName contains unsupportet letters..?

Thanks

Modified on Friday 22 September 2006 2:27:14 pm by K259

Friday 22 September 2006 2:38:43 pm

Hello K259

This seems to depend on the database or on the character set used.
SELECT MD5( 'ö testing' ) worked fine for me on a utf8 website with utf8 database.

I think if you cannot use the md5 function of SQL with your setup you have to persevere and your perl to produce a php type md5 string. Then there should not be a problem as the md5 contains only 'legal' characters.

Claudia

Friday 22 September 2006 2:59:31 pm

Hi Claudia!

Does select æ work?

Friday 22 September 2006 3:37:14 pm

Yes.

Friday 22 September 2006 5:36:46 pm

Hi Claudia

Could you contact me outside these forums?
My email: paul [dot] borgermans [at] gmail [dot] com

Have a nice weekend

Paul

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from