]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-git-proxy: Avoid resolving NO_PROXY against local files
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 29 Jan 2019 16:48:35 +0000 (17:48 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 31 Jan 2019 23:04:50 +0000 (23:04 +0000)
NO_PROXY may contain * elements, and if we are unlucky (or want to match
all hosts with *), we will pick up local files rather than doing the
match in match_host. Quoting helps here.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/oe-git-proxy

index 7a43fe6a6e295f83477ca517526b697d0686c029..1800942f3642ade8f997b00588e18df004fb5e6d 100755 (executable)
@@ -131,8 +131,8 @@ if [ -z "$ALL_PROXY" ]; then
 fi
 
 # Connect directly to hosts in NO_PROXY
-for H in ${NO_PROXY//,/ }; do
-       if match_host $1 $H; then
+for H in "${NO_PROXY//,/ }"; do
+       if match_host $1 "$H"; then
                exec $SOCAT STDIO $METHOD
        fi
 done