Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Night's Watch
-
1
-
NW - 2020-01-22, NW - 2020-02-05
-
Bug Fix
-
Fixed an issue where Puppet would try to parse an XML property list file as ASCII instead of UTF-8.
-
Needs Assessment
Description
When creating a user/group resource on macOS Catalina, the directoryservice provider would fail with the following:
Debug: Failed with ArgumentError on : #<ArgumentError: invalid byte sequence in US-ASCII>
|
Error: Could not prefetch user provider 'directoryservice': undefined method `each' for nil:NilClass
|
This issue is caused by the Puppet::Util::Plist.parse_plist method receiving XML plist_data in ASCII instead of UTF-8 encoding (see https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/user/directoryservice.rb#L95 for an example).
XML plists begin with <?xml version="1.0" encoding="UTF-8"?>. Based on this, we can force the encoding of the plist data to be UTF-8. We do this conditionally, since the parse_plist method can also be called with plist data in binary format.
This issue seems to have been present from the beginning, but luckily no non-ASCII plist data snuck through until now.
Attachments
Issue Links
- is caused by
-
PA-2994 Add OSX Catalina 10.15 (amd64) platform definition to puppet-agent
-
- Resolved
-