Issue #22107 has been updated by Dustin Mitchell.

So (and I'm just showing my steps here) it appears that Ruby-2.0 will gladly 
append an ASCII-8BIT (which is to say, byte-) string to a UTF-8 string when 
there are no high bits set in the ASCII-8BIT string.  Once there's a high bit 
set, you see an exception.  So, the 127-byte string's length header contains 
0x7f, which is safe, while the 128-byte string contains 0x80, which is not.

I think that the error is that the right-hand argument (the string) is 
considered to be in UTF-8.  That comes from the encoding on the StringIO object.

I think that the fixes are:

  * in `Facter::Util::CFPropertyList#guess`, reject the output of `object.read` 
if it is not in ASCII-8BIT
  * in the directoryservice user provider, properly set the encoding of all 
StringIO objects passed into plists

I just lost access to my 10.9 machine, though (turns out puppet was doing 
*something* to the user accounts, since I can't login now), so it could be a 
few before I have a patch.

----------------------------------------
Bug #22107: user provider fails on OS X 10.9 Mavericks
https://projects.puppetlabs.com/issues/22107#change-96165

* Author: Dustin Mitchell
* Status: Needs More Information
* Priority: Normal
* Assignee: Dustin Mitchell
* Category: 
* Target version: 
* Affected Puppet version: 
* Keywords: 
* Branch: 
----------------------------------------
    t-maverick-r5-001:~ root# cat foo.pp
    user { 'test':
    iterations => '26954',
    salt => '81b3d509c7b4d0c1d8e8021bdd5fa21e8b095a60b7ab3f00a5c3fa98fb4d5f39',
    password => 
'265845a0e1c47c558b8845c2c43eccd74eda5dd2d00b501be02a4fe8878d6692fe87803533d72c2a7911576c3df9227d4b8d22dcb692d1b75d50cee2053154e7afcf06280c11369b7d473f7a3012eb5ab3f3fe8e7fef80e561a327aebfa243e749e64052742d9aa3639c6422a083fdecca26b04620949003caa812e1d13bb9d7';
    }

    t-maverick-r5-001:~ root# puppet apply foo.pp
    Error: Could not set 'present' on ensure: incompatible character encodings: 
ASCII-8BIT and US-ASCII at 5:/private/var/root/foo.pp
    Error: Could not set 'present' on ensure: incompatible character encodings: 
ASCII-8BIT and US-ASCII at 5:/private/var/root/foo.pp
    Wrapped exception:
    incompatible character encodings: ASCII-8BIT and US-ASCII
    Error: /User[test]/ensure: change from absent to present failed: Could not 
set 'present' on ensure: incompatible character encodings: ASCII-8BIT and 
US-ASCII at 5:/private/var/root/foo.pp
    Notice: Finished catalog run in 5.94 seconds



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to