Do you have extra good reason to call hashlib function with a variable
called password ?
If you simply want to hash user password, django provide a few
function for that job [1].
it's used like that:
>>> from django.contrib.auth.hashers import make_password, >>> check_password
>>> pwd = make_pass
As a follow-up question to this... this line gives the error "Can't convert
'bytes' object to str implicitly":
vB_hash = hashlib.md5(hashlib.md5(force_bytes(password)).hexdigest() +
force_bytes(salt)).hexdigest()
Do I need to insert a str() somewhere?
--
You received this message because you
Thanks for the help!
If anyone looks at this in the future, this is the code I ended up using:
*hashers.py*
class PBKDF2WrappedvBPasswordHasher(PBKDF2PasswordHasher):
algorithm = 'pbkdf2_vB'
def encode_vB_hash(self, vB_hash, salt, iterations=None):
return super(PBKDF2WrappedvBPa
I can't think of anything offhand besides implementing your own
PBKDF2PasswordHasher subclass which does its own more sophisticated
splitting that doesn't get confused by dollar signs in the salt.
On Tuesday, March 15, 2016 at 7:26:59 PM UTC-4, jorr...@gmail.com wrote:
>
> Holy crap, you guys ha
Holy crap, you guys have really thought of everything! Love it!
Unfortunately this doesn't work on all users because some salts contain the
*$* character which gives the *assert salt and '$' not in salt* error. Is
there a workaround for this?
On Tuesday, March 15, 2016 at 4:59:39 PM UTC+1, Tim
Take a look at
https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-upgrading-without-requiring-a-login
Instead of SHA1PasswordHasher().encode() you'll want to use vBulletin's
hashing algorithm.
On Tuesday, March 15, 2016 at 11:54:32 AM UTC-4, jorr...@gmail.com wrote:
>
> I'
I'm converting an old vBulletin 3.8 installation to a Django web app and
I'm wondering if I can migrate users over with their passwords intact.
vBulletin uses *md5(md5(password) + salt)* to hash its passwords, would any
of Django's built-in password hashers work with this out of the box?
Some o
7 matches
Mail list logo