Puppet: System Administration Automated

Support

Ticket #1220 (new defect)

Opened 4 months ago

Last modified 4 months ago

fileserver.conf (parsed by network/authstore.rb) will not accept single-word hostnames (et al)

Reported by: technogeeky Assigned to: technogeeky
Priority: normal Milestone:
Component: Debian Version: 0.24.4
Severity: minor Keywords: fileserver.conf authstore parse "Invalid pattern"
Cc: chadh Triage Stage: Accepted
Attached Patches: Insufficient Complexity: Easy

Description

The parser for fileserver.conf does not have a case allowing a single-word hostname to be used like it does for fully-qualified domain names, wildcards, and IP addresses.

Example of an "invalid" fileserver.conf:

[files]
path /to/files
allow foo

The FQDN regex won't allow this because it requires a period (".") to match.

There are probably arguments against allowing someone to put a single-word hostname in the fileserver.conf, but many simpler configurations will encounter this.

My patch (to be attached) does *not* allow wildcard matching on a single hostname. My reasoning for this decision is based on security: whereas an accidental asterisk ("*") in a FQDN may cause unintentional access rights to be granted/denied, such an error in a single-word hostname could have tremendously worse effects.

Additionally, I have changed the two nearby regexes which would not match on some allowed (and used, in my case) domains which start with numbers (00hostname.invalid). Additionally, I modified the rest of the regex to comply with the stanard "starting and ending in alphanumerics without dashes" description of the hostname/DNS RFCs.

Attachments

authstore.rb.patch (1.2 kB) - added by technogeeky on 05/14/08 19:40:15.
correctly fixed previous spelling error in comment :)

Change History

05/14/08 19:40:15 changed by technogeeky

  • attachment authstore.rb.patch added.

correctly fixed previous spelling error in comment :)

05/14/08 20:09:59 changed by technogeeky

  • complexity changed from Unknown to Easy.
  • severity changed from normal to minor.

05/16/08 09:28:47 changed by jamtur01

  • owner changed from community to jamtur01.
  • status changed from new to assigned.
  • stage changed from Unreviewed to Accepted.
  • patch changed from Code to Insufficient.

I'd like to see tests for this.

05/16/08 09:29:40 changed by jamtur01

  • owner changed from jamtur01 to technogeeky.
  • status changed from assigned to new.