aboutsummaryrefslogtreecommitdiff
path: root/lib/puppet/feature
diff options
context:
space:
mode:
authorJacob Helwig <jacob@technosorcery.net>2018-07-12 14:07:56 -0700
committerJacob Helwig <jacob@technosorcery.net>2018-07-12 14:07:56 -0700
commiteec1c193d9043622bf27e162dfb8ffb248ae0caa (patch)
tree0ca0d6631b2b12fc9a26d3c75ffbf4b669c09742 /lib/puppet/feature
parente85283b0f41ae1635954c76b2978e34c260794cd (diff)
downloadpuppet-augeas_core-eec1c193d9043622bf27e162dfb8ffb248ae0caa.tar.gz
puppet-augeas_core-eec1c193d9043622bf27e162dfb8ffb248ae0caa.tar.bz2
(MODULE-7443) Safely deserialize stringified array
This ports PUP-8974, and the related follow-up maintenance commits from the Puppet repo. The augeas provider used Kernel#eval to convert stringified arrays to Ruby arrays. For example, it extracted the array part of the "clause" below: onlyif => 'values HostKey == ["/etc/ssh/ssh_host_rsa_key"]' and called Kernel#eval with '["/etc/ssh/ssh_host_rsa_key"]'. Using eval is bad because it executes arbitrary code. This commit changes the provider to convert the comma delimited string to a Ruby array. This mostly maintains the functionality of the original Kernel#eval (minus running arbitrary code) except for no longer handling the \M-x, \M-\C-x, \M-\cx, \c\M-x, \c?, and \C-? escape sequences in double-quoted strings, and \u{nnnn ...} is more lenient about whitespace.
Diffstat (limited to 'lib/puppet/feature')
0 files changed, 0 insertions, 0 deletions