puppetlabs/puppet — pull request #2753 by ffrank (2014-06-09 15:15:45+00:00)
Title: (PUP-2737) purge sshkeys with spaces in the title

In order to generate ssh_authorized_key resource for purging, the user
type needs its own parsing logic for ssh_authorized_keys files, as it
cannot directly emply a provider of ssh_authorized_key. This was originally
implemented in a rather half-assed way and worked only for keys without
spaces in the comment string (which Puppet uses as the resource title).

To fix this, unify the parsing logic by using the same regular expression
with which the ssh_authorized_key provider extracts the respective fields
from the keyfiles.

NOTE: This is based on the maint proposal from #2744.