Jira (PUP-9639) Windows package resource does not remove trailing whitespace

10 views
Skip to first unread message

Jarret Lavallee (JIRA)

unread,
Apr 10, 2019, 6:01:17 PM4/10/19
to puppe...@googlegroups.com
Jarret Lavallee updated an issue
 
Puppet / Bug PUP-9639
Windows package resource does not remove trailing whitespace
Change By: Jarret Lavallee
Summary: CLONE - Package Inspector in Windows is reading in the version number without removing package resource does not remove trailing whitespace
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Jarret Lavallee (JIRA)

unread,
Apr 10, 2019, 6:03:02 PM4/10/19
to puppe...@googlegroups.com
Jarret Lavallee updated an issue
Change By: Jarret Lavallee
Labels: cstop10 jira_escalated maintenance triage
Team: Installer and Management Puppet Romania

Charlie Sharpsteen (JIRA)

unread,
Apr 10, 2019, 7:08:02 PM4/10/19
to puppe...@googlegroups.com
Charlie Sharpsteen commented on Bug PUP-9639
 
Re: Windows package resource does not remove trailing whitespace

In addition to null bytes, we should also make sure the provider returns clean UTF-8 strings. Since we're reading from the Windows registry there can literally be random binary garbage in some of these fields.

Josh Cooper (JIRA)

unread,
Apr 10, 2019, 7:14:02 PM4/10/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-9639

This is easily reproducible by editing an installed package's DisplayName to contain trailing null characters in the registry (use the Modify Binary Data... option. Run puppet resource package --to_yaml packages.yaml and it will preserve the null bytes in the output:

$ od -c ~/Downloads/kdiff.yaml
0000000            K   D   i   f   f   3       (   r   e   m   o   v   e
0000020        o   n   l   y   )  \0  \0  \0   :  \r  \r  \n
0000040        e   n   s   u   r   e           :       '   i   n   s   t
0000060    a   l   l   e   d   '  \r  \r  \n                   p   r   o
0000100    v   i   d   e   r   :       '   w   i   n   d   o   w   s   '
0000120   \r

The windows package provider should left and right strip package names. Unfortunately there are now safeguards around what application installers put in the registry, so we have to be defensive about the data we read from there.

Josh Cooper (JIRA)

unread,
Apr 10, 2019, 7:18:03 PM4/10/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-9639

Yeah we've had the random garbage problem in the past, e.g. PUP-2937, PUP-5640, PUP-3837, etc. Ruby's builtin methods for reading the registry are unreliable, so we implemented our own methods to ensure we return valid UTF-8.

Eric Thompson (JIRA)

unread,
Apr 12, 2019, 5:38:02 PM4/12/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Apr 16, 2019, 10:56:03 AM4/16/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Apr 17, 2019, 5:55:03 AM4/17/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Apr 17, 2019, 5:56:04 AM4/17/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - Triage 2019-05-02

Gheorghe Popescu (JIRA)

unread,
Apr 17, 2019, 9:43:05 AM4/17/19
to puppe...@googlegroups.com

Sebastian Miclea (JIRA)

unread,
Apr 24, 2019, 4:18:03 AM4/24/19
to puppe...@googlegroups.com

Sebastian Miclea (JIRA)

unread,
Apr 24, 2019, 4:18:04 AM4/24/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
May 2, 2019, 5:21:08 AM5/2/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-05-02 , PR - 2019-05-15

Gheorghe Popescu (JIRA)

unread,
May 7, 2019, 5:39:03 AM5/7/19
to puppe...@googlegroups.com
Gheorghe Popescu commented on Bug PUP-9639
 
Re: Windows package resource does not remove trailing whitespace

Charlie Sharpsteen i'm not sure using the GUID would be the best solution for handling this(eg. you might not have the GUID beofre the package is installed, what happens if the packages is removed and then installed again)

There was a PR raised that replaces the null bytes with spaces, that should fix the described issues. If there are any other issues that needs to be treated, as Ethan Brown stated, we would go in a far more complicated scenario and we should have that in a separate ticket.

Mihai Buzgau (JIRA)

unread,
May 15, 2019, 5:29:09 AM5/15/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-05-02, PR - 2019-05-15 , PR - 2019-05-29

Oana Tanasoiu (JIRA)

unread,
Jun 10, 2019, 3:14:03 AM6/10/19
to puppe...@googlegroups.com

Heston Hoffman (JIRA)

unread,
Jun 12, 2019, 7:32:03 PM6/12/19
to puppe...@googlegroups.com
Heston Hoffman updated an issue
Change By: Heston Hoffman
Labels: cstop10 jira_escalated maintenance resolved-issue-added triage

Gheorghe Popescu (JIRA)

unread,
Jul 3, 2019, 4:45:04 AM7/3/19
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Fix Version/s: PUP 5.5.z
Fix Version/s: PUP 6.4.3
Fix Version/s: PUP 6.0.10
Fix Version/s: PUP 5.5.15

Alvin Rodis (Jira)

unread,
Dec 5, 2022, 5:48:03 AM12/5/22
to puppe...@googlegroups.com
Alvin Rodis updated an issue
Change By: Alvin Rodis
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 50334
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages