Jira (PUP-9961) Execute can fail on Windows if command is marked Sensitive

4 views
Skip to first unread message

William Hurt (JIRA)

unread,
Aug 13, 2019, 3:39:03 AM8/13/19
to puppe...@googlegroups.com
William Hurt created an issue
 
Puppet / Bug PUP-9961
Execute can fail on Windows if command is marked Sensitive
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2019/08/13 12:38 AM
Priority: Normal Normal
Reporter: William Hurt

 

Desired Behavior:

Commandline arrays should be treated the same whether the execute method is passed the ':sensitive' option or not.

Actual Behavior:

In the case statement on lines 165-172 of execution.rb, if the option hash contains the ':sensitive' option, the casting of all array elements to string that occurs on line 168 is not done.

The means that later in the execute_windows method when part.include?(' ') is called, there will be an error if one of the array elements is not a string.

Examples:
This issue was encountered during the course of the PR to chocolatey to redact sensitive commandline calls.
The type had to be modified to munge all values to the priority property to string, because it is not uncommon to supply integers to that property, which after supplying the ':sensitive' option to the execute method in the provider suddenly started throwing an error.

This error seems likely to only be possible on Windows since the `include?` call seems to part of an effort at quote normalization that doesn't seem to be necessary in the excute_posix method.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Jorie Tappa (JIRA)

unread,
Aug 19, 2019, 1:00:03 PM8/19/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Aug 23, 2019, 5:46:03 PM8/23/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-9961
 
Re: Execute can fail on Windows if command is marked Sensitive

Marking this as a duplicate of PUP-9973, as unfortunately the issue affects all platforms.

Reply all
Reply to author
Forward
0 new messages