2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-05 21:20:51 +00:00
This commit is contained in:
quadrismegistus 2020-09-13 13:39:09 +01:00
parent 5b59aed17d
commit 5e54c6aa0e

View File

@ -133,12 +133,37 @@ class TheOperator(Operator):
def login(self,name,pubkey,secret_login,**data):
# get my records
# check name?
if name != self.crypt_keys.get(
name_record = self.crypt_keys.get(
b64enc(pubkey),
prefix='/name/'
):
)
pubkey_record = self.crypt_keys.get(
name,
prefix='/pubkey/'
)
secret_record = self.crypt_keys.get(
b64enc(pubkey),
prefix='/secret_login/'
)
self.log(f'''Checking inputs:
{name} (input)
vs.
{my_name} (record)
{pubkey} (input)
vs.
{pubkey_record} (record)
{secret_record} (input)
vs.
{pubkey_record} (record)
''')
# check name?
if name != :
success = False
# check pubkey?