Issue #14852 has been updated by Daniel Pittman.

Status changed from In Topic Branch Pending Review to Merged - Pending Release
Target version changed from 2.7.x to 2.7.20
Affected Puppet version deleted (2.7.15rc4)

This fixes a general problem with the component extraction; I have committed 
it.  Thanks.
----------------------------------------
Bug #14852: Puppet should correctly parse CN when DN contains an emailAddress 
following the CN
https://projects.puppetlabs.com/issues/14852#change-70169

Author: Jeff McCune
Status: Merged - Pending Release
Priority: Normal
Assignee: Jeff McCune
Category: SSL
Target version: 2.7.20
Affected Puppet version: 
Keywords: ssl certificate dn subject cn emailAddress cert
Branch: https://github.com/puppetlabs/puppet/pull/837


# 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