Jira (PUP-10544) File sources whose path starts with double slashes are interpreted as a local file

15 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Jun 17, 2020, 3:14:03 PM6/17/20
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Bug PUP-10544
File sources whose path starts with double slashes are interpreted as a local file
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/06/17 12:13 PM
Priority: Normal Normal
Reporter: Josh Cooper

Specifying a file source with an extra 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/puppetserver':
  ensure => file,
  source => "https://github.com//index.html",
}

The agent run results in:

# 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 '1592421060'
Error: /Stage[main]/Main/File[/tmp/puppetserver]: Could not evaluate: Could not retrieve information from environment production source(s) https://github.com//index.html

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

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Jun 17, 2020, 3:28:03 PM6/17/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 17, 2020, 3:37:03 PM6/17/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
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:

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

The agent run results in:

{noformat}
#
$ 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 ' 1592421060 1592422524 '
Error: /Stage[main]/Main/File[/tmp/
puppetserver doubleslash ]: Could not evaluate: Could not retrieve information from environment production source(s) https http :// github www . google. com//index.html
{noformat}

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

Josh Cooper (Jira)

unread,
Jun 17, 2020, 3:56:02 PM6/17/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 17, 2020, 4:21:03 PM6/17/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 18, 2020, 1:59:03 PM6/18/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 18, 2020, 7:55:03 PM6/18/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Bug Fix
Release Notes Summary: 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".

Josh Cooper (Jira)

unread,
Jun 19, 2020, 12:11:03 PM6/19/20
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Jul 7, 2020, 9:47:04 AM7/7/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages