From 14bb7aa24ed7a06ce94e59f64ab32bdb44641168 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Thu, 6 Feb 2020 11:09:32 -0500 Subject: [PATCH] 16133: Don't take multiple hops when getting collections. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- lib/controller/federation/conn.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/controller/federation/conn.go b/lib/controller/federation/conn.go index 4d4141ffd6..2aebc0e970 100644 --- a/lib/controller/federation/conn.go +++ b/lib/controller/federation/conn.go @@ -231,7 +231,13 @@ func (conn *Conn) CollectionGet(ctx context.Context, options arvados.GetOptions) // UUID is a PDH first := make(chan arvados.Collection, 1) err := conn.tryLocalThenRemotes(ctx, func(ctx context.Context, remoteID string, be backend) error { - if remoteID != "" && strings.Contains(downstream, remoteID) { + if remoteID != "" && downstream != "" { + // If remoteID isn't in downstream, we + // might find the collection by taking + // another hop, but we don't bother: + // token salting and blob signature + // rewriting don't work over multiple + // hops. return notFoundError{} } c, err := be.CollectionGet(ctx, options) -- 2.30.2