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

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 6.17.0
    • Component/s: None
    • Labels:
    • Template:
      PUP Bug Template
    • Team:
      Coremunity
    • Sprint:
      Platform Core KANBAN
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      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 ".
    • QA Risk Assessment:
      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

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

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support