Compare commits

...

2 Commits

Author SHA1 Message Date
4fae36ff79
Merge branch 'master' of https://git.kmlabz.com/BiztProtoBois/server into master
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-23 18:54:20 +02:00
6157c68c30
fix login 2021-04-23 18:54:05 +02:00

View File

@ -47,11 +47,14 @@ class Authetication:
try: try:
b64pwd = b64encode(SHA256.new(password.encode('utf-8')).digest()) b64pwd = b64encode(SHA256.new(password.encode('utf-8')).digest())
bcrypt_check(b64pwd, user['password'].encode('utf-8')) bcrypt_check(b64pwd, user['password'].encode('utf-8'))
auth_logger.debug("User logged in: " + username)
return user['homeDir']
except ValueError: except ValueError:
auth_logger.debug("User NOT logged in: " + username) auth_logger.debug("User NOT logged in: " + username)
return '' return ''
auth_logger.debug("User logged in: " + username) else:
return user['homeDir'] auth_logger.error("User not found")
return ''
def checkUserExists(self, username: str) -> bool: def checkUserExists(self, username: str) -> bool:
with open(self.CONFIG_FILE_LOCATION) as json_file: with open(self.CONFIG_FILE_LOCATION) as json_file: