trim hash whitespace in validatehash

This commit is contained in:
Kevin Froman 2018-01-28 16:21:51 -06:00
parent 692de7a147
commit 172e709c46
No known key found for this signature in database
GPG Key ID: 0D414D0FE405B63B
1 changed files with 2 additions and 1 deletions

View File

@ -99,8 +99,9 @@ class OnionrUtils:
def validateHash(self, data, length=64):
'''Validate if a string is a valid hex formatted hash'''
retVal = True
if retVal == False or retVal:
if retVal == False or retVal == True:
return False
data = data.strip()
if len(data) != length:
retVal = False
else: