summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2011-05-30 20:17:11 +0200
committerJacob Helwig <jacob@puppetlabs.com>2011-07-26 14:04:28 -0700
commit0c385f1fb436ab6f667693d347f711470305a019 (patch)
tree55729107ceff5b3f3062cfdac524696e69c4018b /lib/puppet/network
parent8da0486c36e095e9a08b6f5a79abf3cabeba6603 (diff)
downloadpuppet-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.rb2
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