mvdan / bitw

Minimalist BitWarden client
BSD 3-Clause "New" or "Revised" License
169 stars 15 forks source link

Runtime error on bitw dump #28

Closed xPMo closed 3 years ago

xPMo commented 3 years ago

Let me know if there's any way I could provide more info.

❯ ./bitw dump
Password:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x71707b]

goroutine 1 [running]:
main.run(0xc00012e010, 0x1, 0x1, 0x0, 0x0)
        /home/pmo/.local/share/go/pkg/mod/mvdan.cc/bitw@v0.0.0-20201128232643-ecb1d183db6c/main.go:268 +0xc9b
main.main1(0x824620, 0xc000128010, 0xc00007a058)
        /home/pmo/.local/share/go/pkg/mod/mvdan.cc/bitw@v0.0.0-20201128232643-ecb1d183db6c/main.go:53 +0xb7
main.main()
        /home/pmo/.local/share/go/pkg/mod/mvdan.cc/bitw@v0.0.0-20201128232643-ecb1d183db6c/main.go:46 +0x39
mvdan commented 3 years ago

Ah, thanks for reporting - I can reproduce too. When I wrote the dump command, I only had passwords stored in bitwarden, so I didn't test other kinds of secrets. It seems like card ciphers don't have a "login" object, so we then panic.

I've sent a fix at https://github.com/mvdan/bitw/pull/29; do you want to give it a go or review it?

xPMo commented 3 years ago

The branch there works, thanks!