public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/asterisk/files/
Date: Tue,  6 Dec 2022 09:11:45 +0000 (UTC)	[thread overview]
Message-ID: <1670317886.9666ed882a52f3280c9078bf6107fffa1a9da134.sam@gentoo> (raw)

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


             reply	other threads:[~2022-12-06  9:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06  9:11 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-08-24 21:11 [gentoo-commits] repo/gentoo:master commit in: net-misc/asterisk/files/ John Helmert III
2021-06-17  6:49 Joonas Niilola
2020-04-01 14:38 Joonas Niilola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1670317886.9666ed882a52f3280c9078bf6107fffa1a9da134.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox