Skip to content

Commit

Permalink
fix: use shellquote instead of single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelkovtunov committed Jul 9, 2024
1 parent f2d40e4 commit 17d73f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifests/export/pem_cert.pp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

$passin_opt = $in_pass ? {
undef => '',
default => "-nokeys -passin pass:'${in_pass}'",
default => "-nokeys -passin pass:${shellquote($in_pass)}",
}

if $ensure == 'present' {
Expand Down
4 changes: 2 additions & 2 deletions manifests/export/pem_key.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
if $ensure == 'present' {
$passin_opt = $in_pass ? {
undef => '',
default => "-passin pass:${in_pass}",
default => "-passin pass:${shellquote($in_pass)}",
}

$passout_opt = $out_pass ? {
undef => '-nodes',
default => "-passout pass:${out_pass}",
default => "-passout pass:${shellquote($out_pass)}",
}

$cmd = [
Expand Down
4 changes: 2 additions & 2 deletions manifests/export/pkcs12.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
if $ensure == 'present' {
$pass_opt = $in_pass ? {
undef => '',
default => "-passin pass:${in_pass}",
default => "-passin pass:${shellquote($in_pass)}",
}

$passout_opt = $out_pass ? {
undef => '',
default => "-passout pass:${out_pass}",
default => "-passout pass:${shellquote($out_pass)}",
}

$chain_opt = $chaincert ? {
Expand Down

0 comments on commit 17d73f4

Please sign in to comment.