mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-21 16:39:08 -07: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:
parent
9f081ca04f
commit
b34d141eed
3 changed files with 44 additions and 23 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue