BigDiver

Dive away, explore the net…

Archive for the ‘python’ Category

Problems with MD5 and mod_python

without comments

When calculating MD5 hashes from mod_python in Debian Testing the result of MD5 calculations were all wrong. Something as simple as:

hash= md5.new("string").hexdigest()

would yield a result with a bunch of leading zeros instead of the actual result. No users could authenticate to the web site because of that.

running the same code directly in python interpreter would work fine and the results were ok.

I tracked down the problem to the php4-mhash and libmhash2, once these were removed from the system MD5 was back to normal on mod_python.

Written by bigdiver

March 16, 2007 at 6:47 pm

Posted in python