Skip to content

Commit

Permalink
login: print a big warning when using --password
Browse files Browse the repository at this point in the history
Task command lines are world readable via /proc/pid/cmdline, so this isn't
safe.

Signed-off-by: Tycho Andersen <[email protected]>
  • Loading branch information
tych0 committed Jul 3, 2017
1 parent 92a2a1d commit c269ad2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/command/registry/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ func runLogin(dockerCli command.Cli, opts loginOptions) error {
ctx := context.Background()
clnt := dockerCli.Client()

if opts.password != "" {
fmt.Fprintln(dockerCli.Err(), "WARNING! Using --password via the CLI is insecure.")
}

var (
serverAddress string
authServer = command.ElectAuthServer(ctx, dockerCli)
Expand Down

0 comments on commit c269ad2

Please sign in to comment.