[pacman-dev] [PATCH] scripts: protect against unintended glob matching in [[ ]] RHS

Allan McRae allan at archlinux.org
Wed May 8 01:00:07 UTC 2019


On 28/4/19 12:54 pm, Eli Schwartz wrote:
> The right-hand side of the [[ ... = ... ]] keyword is an exception to
> the general rule that quoting is unnecessary with [[
> 
> This is usually not a problem, e.g. in libmakepkg, lint_one_pkgname will
> already fail if pkgname has an asterisk, but it certainly doesn't hurt
> to be "more proper" and go with the spec; it is more dangerous in
> repo-add, which can get caught in an infinite loop instead of safely
> asserting there is no package named 'foo*'.
> 
> Reported-by: Rafael Ascensão <rafa.almas at gmail.com>
> Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
> ---
>  scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in | 2 +-
>  scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in    | 2 +-
>  scripts/libmakepkg/lint_pkgbuild/depends.sh.in      | 2 +-
>  scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in  | 2 +-
>  scripts/libmakepkg/lint_pkgbuild/optdepends.sh.in   | 2 +-
>  scripts/libmakepkg/lint_pkgbuild/provides.sh.in     | 2 +-
>  scripts/libmakepkg/source/git.sh.in                 | 2 +-
>  scripts/libmakepkg/tidy/zipman.sh.in                | 2 +-
>  scripts/pacman-db-upgrade.sh.in                     | 2 +-
>  scripts/repo-add.sh.in                              | 4 ++--
>  10 files changed, 11 insertions(+), 11 deletions(-)

Looks good.  (I'll allow the formatting fix that slipped in at the end
there!)

A


More information about the pacman-dev mailing list