public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/devmanual:master commit in: tools-reference/sed/
Date: Mon, 29 Mar 2021 20:44:05 +0000 (UTC)	[thread overview]
Message-ID: <1617050497.0b00ff1312e734ae453a9f61f504bdc400b2b2df.ulm@gentoo> (raw)

commit:     0b00ff1312e734ae453a9f61f504bdc400b2b2df
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 20 14:48:24 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Mar 29 20:41:37 2021 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=0b00ff13

tools-reference/sed: emphasise need for delimiter care

Bug: https://bugs.gentoo.org/685160
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 tools-reference/sed/text.xml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools-reference/sed/text.xml b/tools-reference/sed/text.xml
index b971946..f116eac 100644
--- a/tools-reference/sed/text.xml
+++ b/tools-reference/sed/text.xml
@@ -132,7 +132,12 @@ The above will replace <c>irksome texting</c> with
 <p>
 If the pattern or the replacement string contains the forward slash character,
 it is usually easiest to use a different delimiter. Most punctuation characters
-are allowed, although backslash and any form of brackets should be avoided.
+are allowed, although backslash and any form of brackets should be avoided. You
+should choose your delimiter <b>with care</b> to ensure it cannot appear in any
+strings involved in the subject/replacement. For example, using <c>sed</c> with
+CFLAGS is hazardous because it is user-supplied data (so may contain any
+character), but one should in particular avoid e.g.
+<uri link="https://bugs.gentoo.org/685160">the colon</uri> here.
 </p>
 
 <codesample lang="ebuild">


             reply	other threads:[~2021-03-29 20:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 20:44 Ulrich Müller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-24  9:47 [gentoo-commits] proj/devmanual:master commit in: tools-reference/sed/ Ulrich Müller
2021-03-29 20:44 Ulrich Müller

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=1617050497.0b00ff1312e734ae453a9f61f504bdc400b2b2df.ulm@gentoo \
    --to=ulm@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