Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-1890

URI.unescape mangles UTF-8 paths producing invalid ASCII strings

    Details

    • Template:
    • Acceptance Criteria:
      • Existing test suites pass
      • May need additional acceptance tests to handle edge cases
      • Test cases should include puppet apply as well as puppet server.
    • Team:
      Agent
    • Story Points:
      5
    • Sprint:
      Agent 2017-04-05, Agent 2017-04-19, Agent 2017-05-03, Agent 2017-05-31, Agent 2017-06-14
    • CS Priority:
      Reviewed
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      In some scenarios puppet could fail to manage file resources with UTF-8 file names because of incorrect character encoding and escaping when transforming requests into URI-compatible text. This is resolved in puppet 4.10.2 and 5.0.0.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      Tested in spec

      Description

      Hi,

      I am running a puppet server under Ubuntu 12.04 (Puppet 2.7.11) and a puppet client under Ubuntu 14.04 (Puppet 3.4.2).

      I am distributing a directory of ttf fonts from the server to the clients, the rule is

      file

      {"/usr/local/share/fonts/FreeFonts": ensure => directory, mode => 0444, recurse => true, purge => true, source => "puppet:///modules/hadmut/soft/Daten/Fonts/Installation/FreeFonts", }

      This works with a great number of font files, but fails with one particular font:

      Error: Could not set 'file' on ensure: invalid byte sequence in US-ASCII
      Error: Could not set 'file' on ensure: invalid byte sequence in US-ASCII
      Wrapped exception:
      invalid byte sequence in US-ASCII
      Error: /Stage[main]/Hadmut::Application::X11_common/File[/usr/local/share/fonts/FreeFonts/Momоt___.ttf]/ensure: change from absent to file failed: Could not set 'file' on ensure: invalid byte sequence in US-ASCII

      For some reason Puppet assumes that this is an US-ASCII text file, but it should treat this as a binary.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hadmut Hadmut Danisch
                QA Contact:
                Erik Dasher
              • Votes:
                2 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support