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

File sources whose path starts with double slashes are interpreted as a local file

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 6.17.0
    • None
    • Coremunity
    • Platform Core KANBAN
    • Needs Assessment
    • Bug Fix
    • Hide
      Puppet incorrectly handled a file resource if the source parameter's path component had an extra slash, such as "puppet:////modules/mymodule" or "http://server:port//file".
      Show
      Puppet incorrectly handled a file resource if the source parameter's path component had an extra slash, such as " puppet:////modules/mymodule " or " http://server:port//file ".
    • Needs Assessment

    Description

      Specifying a file source with an extra leading slash in the path causes puppet to think the source is a local file, and doesn't provide indications that that's what happened:

      Create the following manifest on the server:

      file { '/tmp/doubleslash':
        ensure => file,
        source => "http://www.google.com//index.html",
      }
      

      The agent run results in:

      $ bx puppet agent -t
      Info: Using configured environment 'production'
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Retrieving locales
      Info: Caching catalog for localhost
      Info: Applying configuration version '1592422524'
      Error: /Stage[main]/Main/File[/tmp/doubleslash]: Could not evaluate: Could not retrieve information from environment production source(s) http://www.google.com//index.html
      

      Running with --http_debug shows that the HEAD request to google is never made.

      Attachments

        Activity

          People

            josh Josh Cooper
            josh Josh Cooper
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support