1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

fix linter warnings/error

This commit is contained in:
catborise 2022-08-24 15:15:27 +03:00
parent aeee56fe45
commit afffaa8589
5 changed files with 18 additions and 17 deletions

View file

@ -27,7 +27,7 @@ def validate_ssh_key(key):
return False
typeofkey = array[0]
string = array[1]
username = array[2]
# must have only valid rsa-ssh key characters ie binascii characters
try:
data = base64.decodebytes(string)
@ -39,10 +39,9 @@ def validate_ssh_key(key):
except struct.error:
return False
# data[4:str_len] must have string which matches with the typeofkey, another ssh key property.
if data[4 : 4 + str_len] == typeofkey:
return True
else:
if data[4 : 4 + str_len] != typeofkey:
return False
return True
def send_email_with_otp(user, device):