Merge pull request #38203 from rallytime/bp-38188

Back-port #38188 to 2016.11
This commit is contained in:
Nicole Thomas 2016-12-12 10:48:51 -07:00 committed by GitHub
commit 669409d681
2 changed files with 5 additions and 2 deletions

View file

@ -1269,9 +1269,12 @@ class AESFuncs(object):
return {}
load.pop('tok')
# Join path
sep_path = os.sep.join(load['path'])
# Path normalization should have been done by the sending
# minion but we can't guarantee it. Re-do it here.
normpath = os.path.normpath(os.path.join(*load['path']))
normpath = os.path.normpath(sep_path)
# Ensure that this safety check is done after the path
# have been normalized.

View file

@ -688,7 +688,7 @@ def push(path, keep_symlinks=False, upload_path=None, remove_source=False):
load_path_split_drive = os.path.splitdrive(load_path_normal)[1]
# Finally, split the remaining path into a list for delivery to the master
load_path_list = os.path.split(load_path_split_drive)
load_path_list = load_path_split_drive.split(os.sep)
load = {'cmd': '_file_recv',
'id': __opts__['id'],