Permalink
Browse files

repair issue where minions don't reauth when master is restarted

  • Loading branch information...
1 parent 224d526 commit 02ad503db2be04250a7477d856d59a3b02f497fb @thatch45 thatch45 committed Nov 6, 2011
Showing with 5 additions and 3 deletions.
  1. +1 −2 salt/crypt.py
  2. +4 −1 salt/master.py
View
@@ -273,8 +273,7 @@ def decrypt(self, data):
data = data[:-self.SIG_SIZE]
if hmac.new(hmac_key, data, hashlib.sha256).digest() != sig:
log.warning('Failed to authenticate message')
- return ''
- #raise AuthenticationError('message authentication failed')
+ raise AuthenticationError('message authentication failed')
iv_bytes = data[:self.AES_BLOCK_SIZE]
data = data[self.AES_BLOCK_SIZE:]
cypher = AES.new(aes_key, AES.MODE_CBC, iv_bytes)
View
@@ -275,7 +275,10 @@ def _handle_aes(self, load):
'''
Handle a command sent via an aes key
'''
- data = self.crypticle.loads(load)
+ try:
+ data = self.crypticle.loads(load)
+ except:
+ return ''
if not data.has_key('cmd'):
log.error('Recieved malformed command {0}'.format(data))
return {}

0 comments on commit 02ad503

Please sign in to comment.