2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 17:43:14 +00:00

If a drone doesn't exist, treat it as if it's an invalid certificate

This commit is contained in:
Jarrod Johnson 2018-07-11 16:29:45 -04:00
parent ce59a36351
commit beedfb0600

View File

@ -287,7 +287,8 @@ def handle_connection(connection, cert, request, local=False):
return
drone = request['name']
droneinfo = cfm.get_collective_member(drone)
if not util.cert_matches(droneinfo['fingerprint'], cert):
if not (droneinfo and util.cert_matches(droneinfo['fingerprint'],
cert)):
tlvdata.send(connection,
{'error': 'Invalid certificate, '
'redo invitation process'})