Posted on 2009-12-10 18:36:52-08 by verifine
Punctuation in passwords
I'm writing a Perl CGI script on SuSE Linux Enterprise Server. I'm using DIgest::MD5 to produce a base64 version of the user-supplied password for authentication. It works perfectly unless the password contains a punctuation character such as "?", "$", etc. In these cases the base64 string produced is different from what it should be (the user cannot log in.) Here's all I'm doing in the script:
use Digest::MD5 qw( md5_base64 ); $digest = md5_base64( $test_pw );
To repeat, it works correctly so long as the password consists of alphanumeric characters, but with punctuation in the password I get incorrect results. Thanks in advance for any help!
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.