Skip to content

Exception when password is unset #95

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Create a webapp2_extras.appengine.auth.models.User entity without setting a 
password
2. Attempt to login with User.get_by_auth_password with the auth id for that 
entity

What is the expected output? What do you see instead?

Expected output is False, None due to not being able to find a user with that 
auth/password combo.  What is returned is the following exception:

user = cls.get_by_auth_password(auth_id, password)
File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5
.2/webapp2_extras/appengine/auth/models.py", line 300, in get_by_auth_password
if not security.check_password_hash(password, user.password):
File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5
.2/webapp2_extras/security.py", line 148, in check_password_hash
if pwhash.count('$') < 2:
AttributeError: 'NoneType' object has no attribute 'count'

What version of the product are you using? On what operating system?

Python Google App Engine with webapp2 version 2.5.2


Original issue reported on code.google.com by suh...@revfluence.com on 29 Sep 2014 at 6:46

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions