summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKerin Millar <kfm@plushkava.net>2022-12-04 04:38:26 +0000
committerSam James <sam@gentoo.org>2022-12-06 09:11:26 +0000
commit9666ed882a52f3280c9078bf6107fffa1a9da134 (patch)
tree8144e00d741ea1ac51ce293ba589671fc1e9add0 /net-misc/asterisk
parentgames-util/game-device-udev-rules: Apply patsub_replacement defences (diff)
downloadgentoo-9666ed882a52f3280c9078bf6107fffa1a9da134.tar.gz
gentoo-9666ed882a52f3280c9078bf6107fffa1a9da134.tar.bz2
gentoo-9666ed882a52f3280c9078bf6107fffa1a9da134.zip
net-misc/asterisk: Apply patsub_replacement defences
Per bug #881383, string replacing forms of parameter expansion must take care to quote - or appropriately escape - any nested parameter expansions, assuming that their values are intended to be taken literally (as is almost invariably the case). This has long been the case, but the introduction of the new patsub_replacement option in bash >=5.2 has brought the issue to the fore. Note that, in this instance, it's actually a command substitution injected into the replacement 'string' that merits quoting. Signed-off-by: Kerin Millar <kfm@plushkava.net> Bug: https://bugs.gentoo.org/881383 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/asterisk')
-rw-r--r--net-misc/asterisk/files/asterisk_wrapper-16.26.1-18.12.16
1 files changed, 3 insertions, 3 deletions
diff --git a/net-misc/asterisk/files/asterisk_wrapper-16.26.1-18.12.1 b/net-misc/asterisk/files/asterisk_wrapper-16.26.1-18.12.1
index 477812171a86..8624bfa3383e 100644
--- a/net-misc/asterisk/files/asterisk_wrapper-16.26.1-18.12.1
+++ b/net-misc/asterisk/files/asterisk_wrapper-16.26.1-18.12.1
@@ -166,9 +166,9 @@ while [[ -r "${rundir}/${progname}.pid" ]]; do
if [[ -r core ]]; then
if [[ -n "${corerename+yes}" ]]; then
core_target="${core_pattern}"
- core_target="${core_target//%h/$(hostname)}"
- core_target="${core_target//%D/$(date +%Y%m%d)}"
- core_target="${core_target//%T/$(date +%H%M%S)}"
+ core_target="${core_target//%h/"$(hostname)"}"
+ core_target="${core_target//%D/"$(date +%Y%m%d)"}"
+ core_target="${core_target//%T/"$(date +%H%M%S)"}"
mv core "${core_target}"
core_target=$(readlink -f "${core_target}")
else