Issue #14852 has been reported by Jeff McCune.

----------------------------------------
Bug #14852: Puppet should correctly parse CN when DN contains an emailAddress 
following the CN
https://projects.puppetlabs.com/issues/14852

Author: Jeff McCune
Status: Unreviewed
Priority: Normal
Assignee: Jeff McCune
Category: SSL
Target version: 2.7.x
Affected Puppet version: 2.7.15rc4
Keywords: ssl certificate dn subject cn emailAddress cert
Branch: 


# Impact Data #

At least one user on the puppet-users list has run into this.

* [Puppet Users - SSL emailAddress interpreted as part of the CN when using 
puppet with an external PKI](http://goo.gl/9DHmg)

# Overview #

If the certificate used on the agent has a DN containing an emailAddress 
component following the CN component, Puppet will incorrectly parse out the CN.

# Expected Behavior #

Given the certificate with DN `subject= /C=UK/ST=Greater 
London/O=example/CN=mir.example.net/[email protected]` Puppet 
should parse out the CN as `mir.example.net`.

# Actual Behavior #

Pupet parses out the CN as `mir.example.net/[email protected]`.

# Additional Data #

This appears to be related to a bad regular expression in 
[lib/puppet/network/http/rack/rest.rb](https://github.com/puppetlabs/puppet/blob/fb4c64b6a54b37ef1357f853fb6d00e17202b410/lib/puppet/network/http/rack/rest.rb#L89)
 on line 89.

`dn_matchdata = dn.match(/^.*?CN\s*=\s*(.*)/)`


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to