* [PATCH] fetch2: BB_ALLOWED_NETWORKS should not care about port numbers
@ 2016-04-01 14:49 Olof Johansson
2016-04-01 15:02 ` Olof Johansson
0 siblings, 1 reply; 2+ messages in thread
From: Olof Johansson @ 2016-04-01 14:49 UTC (permalink / raw
To: bitbake-devel
Bitbake would fail to classify the following URL as belonging to a
allowed network, because of the port number in the url.
BB_ALLOWED_NETWORKS = "*.example.com"
SRC_URI = "http://git.example.com:8080/foo.tar.gz"
Since protocols aren't specified in the BB_ALLOWED_NETWORKS variable,
it's reasonable to believe that this should work regardless of protocol
being used.
Signed-off-by: Olof Johansson <olof.johansson@axis.com>
---
bitbake/lib/bb/fetch2/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 288a1c8..5763a80 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1028,6 +1028,7 @@ def trusted_network(d, url):
if not network:
return True
+ network = network.split(':')[0]
network = network.lower()
for host in trusted_hosts.split(" "):
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fetch2: BB_ALLOWED_NETWORKS should not care about port numbers
2016-04-01 14:49 [PATCH] fetch2: BB_ALLOWED_NETWORKS should not care about port numbers Olof Johansson
@ 2016-04-01 15:02 ` Olof Johansson
0 siblings, 0 replies; 2+ messages in thread
From: Olof Johansson @ 2016-04-01 15:02 UTC (permalink / raw
To: bitbake-devel
On 16-04-01 16:49 +0200, Olof Johansson wrote:
> Bitbake would fail to classify the following URL as belonging to a
> allowed network, because of the port number in the url.
>
> BB_ALLOWED_NETWORKS = "*.example.com"
> SRC_URI = "http://git.example.com:8080/foo.tar.gz"
>
> Since protocols aren't specified in the BB_ALLOWED_NETWORKS variable,
> it's reasonable to believe that this should work regardless of protocol
> being used.
I noticed that this area actually has test coverage, so I resent
an updated patch series with updates to the unit tests as well.
--
olofjn
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-01 15:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-01 14:49 [PATCH] fetch2: BB_ALLOWED_NETWORKS should not care about port numbers Olof Johansson
2016-04-01 15:02 ` Olof Johansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.