This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author m.stoichkovaaa
Recipients m.stoichkovaaa
Date 2020-11-22.14:23:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1606055029.24.0.350061421164.issue42437@roundup.psfhosted.org>
In-reply-to
Content
I am having an issue with crypt library (Lib/crypt.py) when hashing passwords containing dolalr sign ("$") . I am using python 3.8.5 on Linux.  To compare hashed passwords produced by crypt, I used openssl utilities. 

When generating hashes for password without "$", crypt and openssl return the same result.

But when generating hashes for passwords containing $ dollar sign, crypt returns a result different from the result returned by openssl: 

openssl passwd -6 "cash$money"
$6$C0UG33RcHmBVAjQ/$j1Tm2WSaZzDIzVQTgk71z6nY7fiJnaLe6Lxy8DzGystQ1Jive7IuqIUJq5s2F9wdXRpm8jNs7iksV8oHPVKYC0
 
python3 -c 'import crypt; print(crypt.crypt("cash$money","$6$C0UG33RcHmBVAjQ/"))'
$6$C0UG33RcHmBVAjQ/$Tm9aYQq7BsTT/awN6wiUZ6ysamqX9qUVKBV.TjML5udxWqupAB7luv/.KYypZnpQ9eI33R4Lw3O4Jx4NZjTEV/


I did not find a special mention for dollar sign in the documentation. Thanks for your help.
History
Date User Action Args
2020-11-22 14:23:49m.stoichkovaaasetrecipients: + m.stoichkovaaa
2020-11-22 14:23:49m.stoichkovaaasetmessageid: <1606055029.24.0.350061421164.issue42437@roundup.psfhosted.org>
2020-11-22 14:23:49m.stoichkovaaalinkissue42437 messages
2020-11-22 14:23:49m.stoichkovaaacreate