Skip to content

Problems with MD5 and mod_python

March 16, 2007

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.

Advertisements

From → python

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: