File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -273,8 +273,7 @@ def decrypt(self, data):
273273 data = data [:- self .SIG_SIZE ]
274274 if hmac .new (hmac_key , data , hashlib .sha256 ).digest () != sig :
275275 log .warning ('Failed to authenticate message' )
276- return ''
277- #raise AuthenticationError('message authentication failed')
276+ raise AuthenticationError ('message authentication failed' )
278277 iv_bytes = data [:self .AES_BLOCK_SIZE ]
279278 data = data [self .AES_BLOCK_SIZE :]
280279 cypher = AES .new (aes_key , AES .MODE_CBC , iv_bytes )
Original file line number Diff line number Diff line change @@ -275,7 +275,10 @@ def _handle_aes(self, load):
275275 '''
276276 Handle a command sent via an aes key
277277 '''
278- data = self .crypticle .loads (load )
278+ try :
279+ data = self .crypticle .loads (load )
280+ except :
281+ return ''
279282 if not data .has_key ('cmd' ):
280283 log .error ('Recieved malformed command {0}' .format (data ))
281284 return {}
You can’t perform that action at this time.
0 commit comments