parse_mc3 fails to parse hashes generated by passlib
Created originally on Bitbucket by Anonymous
(Imported from Google Code)
alexaholic wrote:
What steps will reproduce the problem?
from passlib.hash import sha512_crypt
from passlib.utils.handlers import parse_mc3
hash = sha512_crypt.encrypt("password")
print parse_mc3(hash, unicode("6
"))
What is the expected output?
Tuple with (rounds, salt, checksum)
What do you see instead?
ValueError: invalid literal for int() with base 10: 'rounds=60000'
What version of the product are you using? On what operating system?
Ubuntu 12.10
Python 2.7.3
passlib 1.6.1
Please provide any additional information below.
See https://code.google.com/p/passlib/source/browse/passlib/utils/handlers.py#177
The code assumes that the rounds is an integer while passlib generates something like "rounds=60000".
I believe it should parse the value from that string.