doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
637 stars 87 forks source link

BUG: edit command is destructive #142

Closed sedlund closed 5 months ago

sedlund commented 12 months ago

when using edit it will remove all custom fields even if nothing is changed

rbw 1.8.3

$ rbw sync

$ rbw get --full snort.social
blah
Username: blah
URI: https://snort.social/new
private: mysecretkey

$ rbw edit snort.social
# opens nvim, I change nothing and :q

$ rbw get --full snort.social
blah
Username: blah
URI: https://snort.social/new
mvaaltola commented 8 months ago

I'm able to replicate this as well. The custom field is not included in the edit file which is probably why it disappears after editing. It seems rbw sends an update to the server even if changing nothing in the edit file and quitting with :q (password history increases). I would expect rbw to only send an update to the server if the edit file is saved and there are actual changes to the file.

kucharskim commented 8 months ago

I just hit the same issue. Did not expect update will go to the server, when I did not change the file with rbw edit command.

doy commented 5 months ago

fixed in 1.10.0, thanks!