Merge pull request #24144 from twangboy/fix_24052

Compare Keys ignores all newlines and carriage returns
This commit is contained in:
C. R. Oldham 2015-05-26 13:25:48 -06:00
commit 1c91a2176f

View file

@ -593,7 +593,8 @@ class SAuth(object):
if os.path.isfile(m_pub_fn) and not self.opts['open_mode']:
local_master_pub = salt.utils.fopen(m_pub_fn).read()
if payload['pub_key'] != local_master_pub:
if payload['pub_key'].replace('\n', '').replace('\r', '') != \
local_master_pub.replace('\n', '').replace('\r', ''):
if not self.check_auth_deps(payload):
return ''