mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Disallow use of remote home directories containing .. in their path (CVE-2019-3828) (#52133)
* Disallow use of remote home directories containing .. in their path * Add CVE to changelog
This commit is contained in:
@@ -635,6 +635,9 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
||||
else:
|
||||
expanded = initial_fragment
|
||||
|
||||
if '..' in os.path.dirname(expanded).split('/'):
|
||||
raise AnsibleError("'%s' returned an invalid relative home directory path containing '..'" % self._play_context.remote_addr)
|
||||
|
||||
return expanded
|
||||
|
||||
def _strip_success_message(self, data):
|
||||
|
||||
Reference in New Issue
Block a user