diff options
-rw-r--r-- | NEWS | 4 | ||||
-rwxr-xr-x | bin/ebuild-helpers/dosym | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,6 @@ +Bug fixes: +* dosym: Prevent globbing of argument in dosym_canonicalize(). + portage-3.0.48.1 (2023-06-06) ---------------- @@ -6,6 +9,7 @@ Bug fixes: portage-3.0.48 (2023-06-01) -------------- + Breaking changes: * Output deprecation warnings for portageq, prepstrip and prepallstrip when they are called from an ebuild (bug #906129, bug #906156). diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym index e41558a15..9ed27b8ce 100755 --- a/bin/ebuild-helpers/dosym +++ b/bin/ebuild-helpers/dosym @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 @@ -33,7 +33,7 @@ if [[ ${option_r} ]]; then dosym_canonicalize() { local path slash i prev out IFS=/ - path=( ${1} ) + read -r -d '' -a path <<< "${1}" [[ ${1} == /* ]] && slash=/ while true; do @@ -41,7 +41,7 @@ if [[ ${option_r} ]]; then # or as a special case, "/.." at the beginning of the path. # Also drop empty and "." path components as we go along. prev= - for i in ${!path[@]}; do + for i in "${!path[@]}"; do if [[ -z ${path[i]} || ${path[i]} == . ]]; then unset "path[i]" elif [[ ${path[i]} != .. ]]; then |