views:

142

answers:

1

Hi all, I tried to use the Http Authentication Digest Scheme with my php (apache module) based website. In general it works fine, but when it comes to verification of the username / hash against my user database i run into a problem. Of course i do not want to store the user´s password in my database, so i tend to store the A1 hashvalue (which is md5($username . ':' . $realm . ':' . $password)) in my db. This is just how the browser does it too to create the hashes to send back.

The Problem:

I am not able to detect if the browser does this in ISO-8859-1 fallback (like firefox, IE) or UTF-8 (Opera) or whatever. I have chosen to do the calculation in UTF-8 and store this md5 hash. Which leads to non-authentication in Firefox and IE browsers.

How do you solve this problem?

Just do not use this auth-scheme? Or Store a md5 Hash for each charset?

Force users to Opera?

(Terms of A1 refer to the http://php.net/manual/en/features.http-auth.php example.) (for digest access authentication read the according wikipedia entry)

A: 

The reason for my problem was a bug in FireFox. Just to answer and close this. Link: https://bugzilla.mozilla.org/show_bug.cgi?id=546330