Debian Bug report logs - #766163
bash-completion: _tilde calls compgen w/o "--" argument protection

version graph

Package: bash-completion; Maintainer for bash-completion is Gabriel F. T. Gomes <gabriel@debian.org>; Source for bash-completion is src:bash-completion (PTS, buildd, popcon).

Reported by: Nikolaus Schulz <nikolaus.schulz@avionic-design.de>

Date: Tue, 21 Oct 2014 09:27:02 UTC

Severity: minor

Tags: fixed-upstream

Found in version bash-completion/1:2.1-4

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#766163; Package bash-completion. (Tue, 21 Oct 2014 09:27:07 GMT) (full text, mbox, link).


Acknowledgement sent to Nikolaus Schulz <nikolaus.schulz@avionic-design.de>:
New Bug report received and forwarded. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Tue, 21 Oct 2014 09:27:07 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Nikolaus Schulz <nikolaus.schulz@avionic-design.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: bash-completion: _tilde calls compgen w/o "--" argument protection
Date: Tue, 21 Oct 2014 11:22:49 +0200
Package: bash-completion
Version: 1:2.1-4
Severity: minor

Hi,

when tilde-expanding in function _tilde(), the following line

  COMPREPLY=( $( compgen -P '~' -u "${1#\~}" ) )

does not protect $1 by preceding it with "--", which means that if $1 starts
with ~- (the $OLDPWD tilde-prefix), compgen will try to interpret characters
after the - as options.

Example: tab-completion of of "mv ~-o":

  $ mv ~-obash: compgen: -o: option requires an argument
  compgen: usage: compgen [-abcdefgjksuv] ...

Nothing too terrible, but still ugly, and easily fixed.

Thanks and have a nice day,
Nikolaus

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash-completion depends on:
ii  bash  4.3-11
ii  dpkg  1.17.13

bash-completion recommends no packages.

bash-completion suggests no packages.

-- no debconf information

-- 
Avionic Design GmbH
Nikolaus Schulz
Wragekamp 10
D-22397 Hamburg
Germany

Tel.:  +49 40 88187-163
Fax:   +49 40 88187-150
Email: nikolaus.schulz@avionic-design.de

Avionic Design GmbH
Amtsgericht Hamburg HRB 82598
Geschäftsführung: Cornelis Broers
Ust.-Ident-Nr.: DE813378254



Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#766163; Package bash-completion. (Sat, 01 Nov 2014 19:54:09 GMT) (full text, mbox, link).


Acknowledgement sent to Ville Skyttä <ville.skytta@iki.fi>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Sat, 01 Nov 2014 19:54:09 GMT) (full text, mbox, link).


Message #10 received at 766163@bugs.debian.org (full text, mbox, reply):

From: Ville Skyttä <ville.skytta@iki.fi>
To: Nikolaus Schulz <nikolaus.schulz@avionic-design.de>, 766163@bugs.debian.org
Subject: Re: [Bash-completion-devel] Bug#766163: bash-completion: _tilde calls compgen w/o "--" argument protection
Date: Sat, 1 Nov 2014 21:51:37 +0200
This and a bunch of other similar ones are now fixed upstream:
http://anonscm.debian.org/cgit/bash-completion/bash-completion.git/commit/?id=882649b



Added tag(s) fixed-upstream. Request was from Nikolaus Schulz <nikolaus.schulz@avionic-design.de> to control@bugs.debian.org. (Thu, 13 Nov 2014 11:57:07 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 09:17:25 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.