Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix password hashing for Python 3 #1016

Closed
wants to merge 1 commit into from

Conversation

takluyver
Copy link
Member

Correctly handle unicode for Python 3. This may also be needed if you want to use non-ascii characters in passwords with Python 2.

I considered pushing this straight to master, but I wanted to remind people how we're handling Python 3 compatibility. I've used cast_bytes on password, so it can be passed in either as bytes or unicode. The salt is generated in the native str type for each platform, so it goes through str_to_bytes, which is a no-op on Python 2.

I'll merge this tomorrow, unless anyone objects.

@takluyver takluyver closed this in 9a89486 Nov 20, 2011
@fperez
Copy link
Member

fperez commented Nov 20, 2011

Great, thanks!

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Rebased to avoid recursive merge; closes ipython#1016.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants