Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"path/filepath"
"strings"

"github.com/howeyc/gopass"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/term"

"github.com/mendersoftware/mender-cli/client/useradm"
"github.com/mendersoftware/mender-cli/log"
Expand Down Expand Up @@ -146,7 +146,7 @@ func (c *LoginCmd) maybeGetPassword() error {
if c.password == "" {
fmt.Printf("Password: ")

p, err := gopass.GetPasswdMasked()
p, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
return err
}
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require (
github.com/cheggaaa/pb/v3 v3.1.7
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.3
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef
github.com/mendersoftware/go-lib-micro v0.0.0-20221025103319-e1f941fb3145
github.com/mendersoftware/mender-artifact v0.0.0-20250529094801-7264a90f1074
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -44,7 +43,6 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
github.com/ulikunitz/xz v0.5.14 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.35.0 // indirect
golang.org/x/text v0.28.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.36.6 // indirect
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef h1:A9HsByNhogrvm9cWb28sjiS3i7tcKCkflWFEkHfuAgM=
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
Expand Down Expand Up @@ -97,8 +95,6 @@ go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
Expand Down
2 changes: 0 additions & 2 deletions licenses.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ github.com/fsnotify/fsnotify,BSD-3-Clause
github.com/go-viper/mapstructure/v2,MIT
github.com/google/uuid,BSD-3-Clause
github.com/gorilla/websocket,BSD-2-Clause
github.com/howeyc/gopass,ISC
github.com/klauspost/compress,Apache-2.0
github.com/klauspost/compress/internal/snapref,BSD-3-Clause
github.com/klauspost/compress/zstd/internal/xxhash,MIT
Expand All @@ -29,7 +28,6 @@ github.com/subosito/gotenv,MIT
github.com/ulikunitz/xz,BSD-3-Clause
github.com/vmihailenco/msgpack,BSD-2-Clause
go.yaml.in/yaml/v3,MIT
golang.org/x/crypto/ssh/terminal,BSD-3-Clause
golang.org/x/sys/unix,BSD-3-Clause
golang.org/x/term,BSD-3-Clause
golang.org/x/text,BSD-3-Clause
Expand Down
6 changes: 5 additions & 1 deletion tests/acceptance/tests/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ def run_and_enter_password(self, *argv, password=""):
"""Returns a CompletedProcess wrapped in CliResult"""
args = [self.path] + list(argv)
p = subprocess.Popen(
args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE
args,
shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
stdout, stderr = p.communicate(input=password.encode() + b"\n")
return CliResult(p, stdout=stdout, stderr=stderr)
Expand Down