Closed Laevos closed 5 months ago
Ah, just realized this doesn't fix the issue; it's not that the ServerConfig
is nil, otherwise we wouldn't even get into the keyring-go code before we hit a nil dereference, so unfortunately the fix seems like it'll have to be upstream, apologies :pensive:
I'm running into an issue that appears to be related to https://github.com/zalando/go-keyring/issues/88, which I describe in https://github.com/zalando/go-keyring/issues/88#issuecomment-1914505694. The gist of the issue is that an incompatibility between go-keyring and KeepassXC causes a segfault in the
SetServerPassword
method as theServerConfig
isn't properly initialized.As there's currently no ETA for the upstream issue being fixed, I propose the following solution to prevent a segfault in the event that this or any other issue crops up which causes the
ServerConfig
to benil
. SincetrySetPasswordAndConnectToServer()
can gracefully handle an error inSetServerPassword()
, this seems like it should be a safe fix since we can just store the password in-memory.