commit: 9666ed882a52f3280c9078bf6107fffa1a9da134 Author: Kerin Millar <kfm <AT> plushkava <DOT> net> AuthorDate: Sun Dec 4 04:38:26 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Dec 6 09:11:26 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9666ed88
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 <AT> plushkava.net> Bug: https://bugs.gentoo.org/881383 Signed-off-by: Sam James <sam <AT> gentoo.org> net-misc/asterisk/files/asterisk_wrapper-16.26.1-18.12.1 | 6 +++--- 1 file 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