From 3d748363f71189cb902e7dad61ffaa3e9e90e256 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 2 Jan 2013 11:42:39 -0800 Subject: [PATCH] pkg/client: don't use config file auth when using an explicit server Change-Id: I07e3080adf4fed13deb3ec5a2ee900f4fc3a77fe --- pkg/client/config.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/client/config.go b/pkg/client/config.go index b92e3943b..9fe2355c0 100644 --- a/pkg/client/config.go +++ b/pkg/client/config.go @@ -90,6 +90,13 @@ func blobServerOrDie() string { func (c *Client) SetupAuth() error { configOnce.Do(parseConfig) + if flagServer != nil && *flagServer != "" { + // If using an explicit blobserver, don't use auth + // configured from the config file, so we don't send + // our password to a friend's blobserver. + c.authMode = auth.None{} + return nil + } return c.SetupAuthFromConfig(config) }