[ARVADOS] updated: 1.3.0-1904-g1b6b00b1f
Git user
git at public.curoverse.com
Fri Nov 22 17:14:38 UTC 2019
Summary of changes:
lib/controller/federation/conn.go | 9 ++++++---
lib/controller/federation/login_test.go | 4 +++-
2 files changed, 9 insertions(+), 4 deletions(-)
via 1b6b00b1f3f1a1931c27c69f1624d2c34e94a880 (commit)
from ed5be18ec61d2edecbf878785633aea2b056b20a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 1b6b00b1f3f1a1931c27c69f1624d2c34e94a880
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Fri Nov 22 12:14:26 2019 -0500
15867: Don't pass blank remote param.
fixes #15867
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/lib/controller/federation/conn.go b/lib/controller/federation/conn.go
index 3829d0a40..3a439eb7d 100644
--- a/lib/controller/federation/conn.go
+++ b/lib/controller/federation/conn.go
@@ -197,10 +197,13 @@ func (conn *Conn) Login(ctx context.Context, options arvados.LoginOptions) (arva
if err != nil {
return arvados.LoginResponse{}, fmt.Errorf("internal error getting redirect target: %s", err)
}
- target.RawQuery = url.Values{
+ params := url.Values{
"return_to": []string{options.ReturnTo},
- "remote": []string{options.Remote},
- }.Encode()
+ }
+ if options.Remote != "" {
+ params.Set("remote", options.Remote)
+ }
+ target.RawQuery = params.Encode()
return arvados.LoginResponse{
RedirectLocation: target.String(),
}, nil
diff --git a/lib/controller/federation/login_test.go b/lib/controller/federation/login_test.go
index e001014e2..e294df7d8 100644
--- a/lib/controller/federation/login_test.go
+++ b/lib/controller/federation/login_test.go
@@ -26,7 +26,9 @@ func (s *FederationSuite) TestDeferToLoginCluster(c *check.C) {
c.Check(err, check.IsNil)
c.Check(target.Host, check.Equals, s.cluster.RemoteClusters["zhome"].Host)
c.Check(target.Scheme, check.Equals, "http")
- c.Check(target.Query().Get("remote"), check.Equals, remote)
c.Check(target.Query().Get("return_to"), check.Equals, returnTo)
+ c.Check(target.Query().Get("remote"), check.Equals, remote)
+ _, remotePresent := target.Query()["remote"]
+ c.Check(remotePresent, check.Equals, remote != "")
}
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list