aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-07-08 16:27:43 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-07-10 10:35:26 -0700
commitb3c4cbd5c16d07937fb9486a88deec29f8aaeb0d (patch)
treebead2af488e25ec22df492ab44bfdcc60aecdab2
parent5622cc44edfb2d653ae67946fa9ea130c5f7fcaa (diff)
downloadmediagoblin-b3c4cbd5c16d07937fb9486a88deec29f8aaeb0d.tar.lz
mediagoblin-b3c4cbd5c16d07937fb9486a88deec29f8aaeb0d.tar.xz
mediagoblin-b3c4cbd5c16d07937fb9486a88deec29f8aaeb0d.zip
only check password if there is a store_hash
-rw-r--r--mediagoblin/plugins/basic_auth/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mediagoblin/plugins/basic_auth/__init__.py b/mediagoblin/plugins/basic_auth/__init__.py
index c16d8855..33a554b0 100644
--- a/mediagoblin/plugins/basic_auth/__init__.py
+++ b/mediagoblin/plugins/basic_auth/__init__.py
@@ -59,7 +59,10 @@ def gen_password_hash(raw_pass, extra_salt=None):
def check_password(raw_pass, stored_hash, extra_salt=None):
- return auth_tools.bcrypt_check_password(raw_pass, stored_hash, extra_salt)
+ if stored_hash:
+ return auth_tools.bcrypt_check_password(raw_pass,
+ stored_hash, extra_salt)
+ return None
def auth():