exavolt / python-phpass Goto Github PK
View Code? Open in Web Editor NEWPython implementation of the portable PHP password hashing framework
Python implementation of the portable PHP password hashing framework
I have an existing set of wordpress users and I want them to transfer over to my new flask-login based system. Can you help, Exavolt? I think I'm just not understanding the part about how the salt comes in on the original site and becomes part of the user_pass hash. Let me know!
https://github.com/exavolt/python-phpass/blob/master/phpass/__init__.py#L102
add salt = salt.encode('utf-8') somewhere after that line
https://pythonhosted.org/passlib/lib/passlib.hash.phpass.html is much better now
On our project, it seems that certain passwords don't authenticate with the phpBB3 hash for that user.
#NOTE: phpbb uses $H$ and phpass uses $P$ so we fix it here
fixed_pwd = "$P"+ their_pwd[2:]
testpass = phpass.PasswordHash(8, False)
passed = testpass.check_password(self.cleaned_data['password'], fixed_pwd)
if not passed:
....
self.cleaned_data['password'] is the plain text password.
fixed_pwd is the hashed password from phpBB3's database.
(yes, I know, bad variable name, it should be fixed_hashed)
Is this a known issue ?
*edit, just tested via the php test program from http://www.openwall.com/phpass/, and it fails there as well.
Go ahead and close this, not your bug. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.