From: Chris Lindee Date: Mon, 16 Feb 2026 06:08:31 +0000 (-0600) Subject: profile/systemd-osc-context: Remove invalid octets X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72e71897f9534ea503283e049f822ea8a0d42e28;p=thirdparty%2Fsystemd.git profile/systemd-osc-context: Remove invalid octets UAPI.15 requires: * No C0 Control Characters (`\x00-\x1f`) * No DEL character (`\x7f`) The following would be nice, but requires a `sed` implementation that is aware of UTF-8: `-e $'y/\x00-\x1f\x7f/␀-␟␡/'`. References: [0] https://uapi-group.org/specifications/specs/osc_context/#general-syntax --- diff --git a/profile.d/80-systemd-osc-context.sh b/profile.d/80-systemd-osc-context.sh index dfed4664044..537facdf1a9 100644 --- a/profile.d/80-systemd-osc-context.sh +++ b/profile.d/80-systemd-osc-context.sh @@ -28,7 +28,7 @@ __systemd_osc_context_escape() { # uuids, id128, hostnames, usernames, since they all come with syntax # requirements that exclude \ and ; anyway. This hence primarily is about # escaping the current working directory. - echo "$1" | sed -e 's/\\/\\x5c/g' -e 's/;/\\x3b/g' + echo "$1" | sed -e 's/\\/\\x5c/g' -e 's/;/\\x3b/g' -e 's/[[:cntrl:]]/⍰/g' } __systemd_osc_context_common() {