Remove eval() and sed quoting in _known_hosts() (Alioth: #311595)
Fixes execution (!!!) of hosts specified by {Global,User}KnownHosts in SSH config files.
This commit is contained in:
parent
a17930f8dd
commit
a9994ac15f
3
CHANGES
3
CHANGES
@ -2,6 +2,9 @@ bash-completion (1.x)
|
||||
|
||||
[ David Paleino ]
|
||||
* Permit .gz files concatenation (Debian: #514377)
|
||||
* Remove eval() and sed quoting in _known_hosts(), fixes execution (!!!)
|
||||
of hosts specified by {Global,User}KnownHosts in SSH config files
|
||||
(Alioth: #311595)
|
||||
|
||||
[ Ville Skyttä ]
|
||||
* Split yum and yum-arch completion into contrib/yum.
|
||||
|
@ -2680,9 +2680,9 @@ _known_hosts()
|
||||
|
||||
if [ ${#config[@]} -gt 0 ]; then
|
||||
# expand path (if present) to global known hosts file
|
||||
global_kh=$( eval echo "$( sed -ne 's/^[ \t]*[Gg][Ll][Oo][Bb][Aa][Ll][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' "${config[@]}" )" )
|
||||
global_kh=$( echo $( sed -ne 's/^[ \t]*[Gg][Ll][Oo][Bb][Aa][Ll][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' "${config[@]}" ) )
|
||||
# expand path (if present) to user known hosts file
|
||||
user_kh=$( eval echo "$( sed -ne 's/^[ \t]*[Uu][Ss][Ee][Rr][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' "${config[@]}" )" )
|
||||
user_kh=$( echo $( sed -ne 's/^[ \t]*[Uu][Ss][Ee][Rr][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' "${config[@]}" ) )
|
||||
fi
|
||||
|
||||
# Global known_hosts files
|
||||
|
Loading…
x
Reference in New Issue
Block a user