forked from openlp/openlp
bug 1593882 - fix authenticated connection but bin not set
This commit is contained in:
parent
45d2640159
commit
76ffe35621
@ -344,16 +344,25 @@ class PJLink1(QTcpSocket):
|
|||||||
return
|
return
|
||||||
elif data_check[1] == '0' and self.pin is not None:
|
elif data_check[1] == '0' and self.pin is not None:
|
||||||
# Pin set and no authentication needed
|
# Pin set and no authentication needed
|
||||||
|
log.warning('({ip}) Regular connection but PIN set'.format(ip=self.name))
|
||||||
self.disconnect_from_host()
|
self.disconnect_from_host()
|
||||||
self.change_status(E_AUTHENTICATION)
|
self.change_status(E_AUTHENTICATION)
|
||||||
log.debug('({ip}) emitting projectorNoAuthentication() signal'.format(ip=self.name))
|
log.debug('({ip}) Emitting projectorNoAuthentication() signal'.format(ip=self.name))
|
||||||
self.projectorNoAuthentication.emit(self.name)
|
self.projectorNoAuthentication.emit(self.name)
|
||||||
return
|
return
|
||||||
elif data_check[1] == '1':
|
elif data_check[1] == '1':
|
||||||
# Authenticated login with salt
|
# Authenticated login with salt
|
||||||
log.debug('({ip}) Setting hash with salt="{data}"'.format(ip=self.ip, data=data_check[2]))
|
if pin is None:
|
||||||
log.debug('({ip}) pin="{data}"'.format(ip=self.ip, data=self.pin))
|
log.warning('({ip}) Authenticated connection but no pin set'.format(ip=self.name))
|
||||||
salt = qmd5_hash(salt=data_check[2].encode('ascii'), data=self.pin.encode('ascii'))
|
self.disconnect_from_host()
|
||||||
|
self.change_status(E_AUTHENTICATION)
|
||||||
|
log.debug('({ip}) Emitting projectorNoAuthentication() signal'.format(ip=self.name))
|
||||||
|
self.projectorNoAuthentication.emit(self.name)
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
log.debug('({ip}) Setting hash with salt="{data}"'.format(ip=self.ip, data=data_check[2]))
|
||||||
|
log.debug('({ip}) pin="{data}"'.format(ip=self.ip, data=self.pin))
|
||||||
|
salt = qmd5_hash(salt=data_check[2].encode('ascii'), data=self.pin.encode('ascii'))
|
||||||
else:
|
else:
|
||||||
salt = None
|
salt = None
|
||||||
# We're connected at this point, so go ahead and do regular I/O
|
# We're connected at this point, so go ahead and do regular I/O
|
||||||
|
Loading…
Reference in New Issue
Block a user