diff options
author | Luke Kanies <luke@madstop.com> | 2007-11-25 02:07:50 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-11-25 02:07:50 -0600 |
commit | 9b5b90c46645a289be178f1ccb8d626f80757c79 (patch) | |
tree | 9fecfe2920619fd61e4585d59aee7b5fe41e5bdd /lib/puppet | |
parent | 4e9c39e6a7ca5ebb9d8343d1e6b835e24c257200 (diff) | |
parent | a88891a5573785867667f6de0cdc539873455226 (diff) | |
download | puppet-9b5b90c46645a289be178f1ccb8d626f80757c79.tar.gz puppet-9b5b90c46645a289be178f1ccb8d626f80757c79.tar.xz puppet-9b5b90c46645a289be178f1ccb8d626f80757c79.zip |
Merge commit 'mccune/pending/fix-906'
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/network/http_server/mongrel.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/puppet/network/http_server/mongrel.rb b/lib/puppet/network/http_server/mongrel.rb index ce2196eca..d6e21b189 100644 --- a/lib/puppet/network/http_server/mongrel.rb +++ b/lib/puppet/network/http_server/mongrel.rb @@ -120,8 +120,11 @@ module Puppet::Network def client_info(request) params = request.params ip = params["REMOTE_ADDR"] - if dn = params[Puppet[:ssl_client_header]] and dn.include?("/CN=") - client = dn.sub("/CN=", '') + # JJM #906 The following dn.match regular expression is forgiving + # enough to match the two Distinguished Name string contents + # coming from Apache, Pound or other reverse SSL proxies. + if dn = params[Puppet[:ssl_client_header]] and dn_matchdata = dn.match(/^.*?CN\s*=\s*(.*)/) + client = dn_matchdata[1].to_str valid = (params[Puppet[:ssl_client_verify_header]] == 'SUCCESS') else client = Resolv.getname(ip) |