Gopass: Wrong version exposed via Json Api

Created on 28 Aug 2020  路  2Comments  路  Source: gopasspw/gopass

Summary

The version exposed via the json api is 0.0.0.

Steps To Reproduce

Use https://github.com/gopasspw/gopassbridge/blob/master/test-client/query-jsonapi.sh with

echo '{"type":"getVersion"}' | ./test-client | gopass-jsonapi listen

Expected behavior

Returns the same version as in gopass-jsonapi --version

Environment

OS: Ubuntu 18.04
OS version: 18.04.04 LTS, 4.15.0-112-generic
gopass Version: 1.10.1-git+HEAD go1.15 linux amd64
Installation method: from source

Additional context

Related issue from gopassbridge: https://github.com/gopasspw/gopassbridge/issues/171

Looks like the version is not correctly set for the API object.
https://github.com/gopasspw/gopass/blob/ef72769301fc4cacf98d13f409c7fd00ee8336e6/cmd/gopass-jsonapi/jsonapi.go#L35
"v1.10.1" is not a valid semantic version so semver fails during parsing. The version is then set to "0.0.0"
The error message is Invalid character(s) found in major number "v1"

bug

Most helpful comment

Unable to use the browser extension as well because of this. Hoping for a quick fix :+1:

All 2 comments

Thanks for reporting. I believe this was reported before.

Unable to use the browser extension as well because of this. Hoping for a quick fix :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doronbehar picture doronbehar  路  4Comments

aperum picture aperum  路  4Comments

sudoforge picture sudoforge  路  4Comments

worldofpeace picture worldofpeace  路  4Comments

dragetd picture dragetd  路  3Comments