yousefvand / secret-service

Service to keep secrets of applications
MIT License
85 stars 11 forks source link

Fix return type for some Collections calls/properties. #13

Closed kainz closed 2 years ago

kainz commented 2 years ago

Some software, such as go-libsecret cares about the return type of some Collections calls and expects dbus ObjectPaths and not strings. There could be more occurences, but this fixes errors of the sort I'm seeing in current go-libsecret like:

panic: interface conversion: interface {} is []string, not []dbus.ObjectPath

goroutine 1 [running]:
github.com/gsterjov/go-libsecret.(*Collection).Items(0xc00015e3c0, 0x0, 0x0, 0x2301458, 0xc0011562f0, 0x22efd58)
        /go/pkg/mod/github.com/gsterjov/go-libsecret@v0.0.0-20161001094733-a6f4afe4910c/collection.go:33 +0x30e
github.com/99designs/keyring.(*secretsKeyring).Keys(0xc0012218c0, 0x0, 0xc00119dea8, 0x4, 0x0, 0x0)
        /go/pkg/mod/github.com/cosmos/keyring@v1.1.7-0.20210622111912-ef00f8ac3d76/libsecret.go:243 +0x150
github.com/cosmos/cosmos-sdk/crypto/keyring.keystore.List(0x22e8da0, 0xc0012218c0, 0xc00024c860, 0x1, 0x1, 0xc00024c870, 0x1, 0x1, 0x0, 0x0, ...)
        /go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.44.0/crypto/keyring/keyring.go:473 +0x4c
github.com/cosmos/cosmos-sdk/client/keys.runListCmd(0xc00121b900, 0x2fdcde0, 0x0, 0x0, 0x0, 0x0)
        /go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.44.0/client/keys/list.go:31 +0x116
github.com/spf13/cobra.(*Command).execute(0xc00121b900, 0x2fdcde0, 0x0, 0x0, 0xc00121b900, 0x2fdcde0)
        /go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:852 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc00110aa00, 0x0, 0x0, 0xc000041818)
        /go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        /go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:890
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0xc00110aa00, 0xc000041818, 0x15, 0x6, 0xc000041818)
        /go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.44.0/server/cmd/execute.go:36 +0x285
yousefvand commented 2 years ago

Thanks for your contribution.