diff options
author | James Cammarata <jimi@sngx.net> | 2014-10-08 14:44:42 -0500 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2014-10-08 14:48:07 -0500 |
commit | 5af8d55b0365a5c3278c43b5424bf5f2ddf897b8 (patch) | |
tree | 8aee92c4451028e40612d9b84d46ed010834399d /commands/command.py | |
parent | e94175d7d0a77f5667db1eb25d53b4180c085548 (diff) | |
download | ansible-modules-core-5af8d55b0365a5c3278c43b5424bf5f2ddf897b8.tar.gz |
Strip newlines off k=v pairs in command/shell argument parsing
Fixes ansible/ansible#9272
Diffstat (limited to 'commands/command.py')
-rw-r--r-- | commands/command.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/commands/command.py b/commands/command.py index c1fabd4f..c584d6fe 100644 --- a/commands/command.py +++ b/commands/command.py @@ -250,12 +250,7 @@ class CommandModule(AnsibleModule): if '=' in x and not quoted: # check to see if this is a special parameter for the command k, v = x.split('=', 1) - v = unquote(v) - # because we're not breaking out quotes in the shlex split - # above, the value of the k=v pair may still be quoted. If - # so, remove them. - if len(v) > 1 and (v.startswith('"') and v.endswith('"') or v.startswith("'") and v.endswith("'")): - v = v[1:-1] + v = unquote(v.strip()) if k in ('creates', 'removes', 'chdir', 'executable', 'NO_LOG'): if k == "chdir": v = os.path.abspath(os.path.expanduser(v)) |