diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2011-05-30 20:17:11 +0200 |
---|---|---|
committer | Jacob Helwig <jacob@puppetlabs.com> | 2011-07-26 14:04:28 -0700 |
commit | 0c385f1fb436ab6f667693d347f711470305a019 (patch) | |
tree | 55729107ceff5b3f3062cfdac524696e69c4018b /lib/puppet/network | |
parent | 8da0486c36e095e9a08b6f5a79abf3cabeba6603 (diff) | |
download | puppet-0c385f1fb436ab6f667693d347f711470305a019.tar.gz puppet-0c385f1fb436ab6f667693d347f711470305a019.tar.xz puppet-0c385f1fb436ab6f667693d347f711470305a019.zip |
Fix #5010 - Allow leading whitespace in auth.conf
The regex used to detect ACE is too lax and would allow trailing
spaces to sneak in, which in turn would confuse the ACE parser.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet/network')
-rw-r--r-- | lib/puppet/network/authconfig.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/puppet/network/authconfig.rb b/lib/puppet/network/authconfig.rb index 4ba89fa71..61fb24ded 100644 --- a/lib/puppet/network/authconfig.rb +++ b/lib/puppet/network/authconfig.rb @@ -130,6 +130,7 @@ module Puppet end def parse_right_directive(right, var, value, count) + value.strip! case var when "allow" modify_right(right, :allow, value, "allowing %s access", count) @@ -159,6 +160,7 @@ module Puppet def modify_right(right, method, value, msg, count) value.split(/\s*,\s*/).each do |val| begin + val.strip! right.info msg % val right.send(method, val) rescue AuthStoreError => detail |