Skip to content
Snippets Groups Projects
Unverified Commit c68c47e9 authored by Shamil K Muhammed's avatar Shamil K Muhammed
Browse files

PEP8 Code and Fix MANIFEST.in

parent 174973d7
Branches
Tags
No related merge requests found
README.rst
LICENSE
\ No newline at end of file
include README.rst
include LICENSE
......@@ -67,7 +67,8 @@ class DiasporaAuthProvider:
# user exists, check if the password is correct.
encrypted_password = user[1]
peppered_pass = "{}{}".format(password, self.config.pepper)
if not (bcrypt.hashpw(peppered_pass.encode('utf8'), encrypted_password.encode('utf8')) == encrypted_password.encode('utf8')):
if not (bcrypt.hashpw(peppered_pass.encode('utf8'), encrypted_password.encode('utf8')) \
== encrypted_password.encode('utf8')):
logger.info("Password given for {} is wrong. Rejecting auth request.".format(local_part))
defer.returnValue(False)
# Ok, user's password is correct. check if the user exists in the homeserver db.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment