kee-org / keepassrpc

The KeePassRPC plugin that needs to be installed inside KeePass in order for Kee to be able to connect your browser to your passwords
GNU General Public License v2.0
635 stars 35 forks source link

Fail to load when port is in use #79

Closed Mincka closed 4 years ago

Mincka commented 5 years ago

Hello,

Would it be possible to gracefully handle the exception (still load the extension) when the port is in use, so it would be possible to change it using the interface?

For some reason, I had to change the default port while the default one was in use by some software I could not identify and stop. Since the plugin won't load when the port set is in use, the only way to update it and load the extension was to find and update the config section.

<Item>
  <Key>KeePassRPC.webSocket.port</Key>
  <Value>12499</Value>
</Item>

Thanks!

luckyrat commented 4 years ago

You can also supply a command line parameter in case this issue re-occurs for you: https://forum.kee.pm/t/keepassrpc-port/2360

Establishing the port is currently fundamental to the startup of the plugin and it can't be re-initialised on demand. It's a decade since I wrote that code so I can't say with certainty whether it needs to keep behaving in that way but I am wary of changing something in the security critical startup path without spending more time than I currently have available to specify and verify the alteration.