Remove critical code from assert statements

This commit is contained in:
Lonami Exo
2018-08-14 19:14:13 +02:00
parent 7efa53fedf
commit f4b9c9d6d4
4 changed files with 17 additions and 7 deletions

View File

@@ -163,7 +163,9 @@ async def do_authentication(sender):
if dh_hash != new_nonce_hash:
raise SecurityError('Step 3 invalid new nonce hash')
assert isinstance(dh_gen, DhGenOk), 'Step 3.2 answer was %s' % dh_gen
if not isinstance(dh_gen, DhGenOk):
raise AssertionError('Step 3.2 answer was %s' % dh_gen)
return auth_key, time_offset