Compare Keys removing all newlines and carriage returns

This commit is contained in:
twangboy 2015-05-26 17:34:14 +00:00
parent 89cdf976e1
commit c197b41494

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 ''