keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.8k stars 1.44k forks source link

[Remote Sync] Hardcoded wait timeout does not allow enough time #11234

Open ItsOnlyBinary opened 1 week ago

ItsOnlyBinary commented 1 week ago

Summary

The remote sync code has a hard coded 10 second wait time before killing the process. This is not long enough when the command is talking to a slower server which is performing multiple steps (protocol negotiation + database lookups + response time)

Please expose a configuration option for waitForFinished here and here

With this increased it is possible to sync with NextCloud using curl.

As a side note wishlist, it would be really nice if there was options to auto sync at login and save. (so I don't forget to sync)

@t-h-e You have my thanks and appreciation for adding the one feature, holding me back from switching over. :)

Examples

Example commands for syncing with NextCloud using a directory shared with a password:

download:

curl --silent --user SHARE_ID:SHARE_PASSWORD -H "X-Requested-With: XMLHttpRequests" -H "X-Method-Override: GET" --output {TEMP_DATABASE} https://cloud.example.com/public.php/webdav/Example.kdbx

upload:

curl --silent --user SHARE_ID:SHARE_PASSWORD -H "X-Requested-With: XMLHttpRequests" -H "X-Method-Override: PUT" --upload-file {TEMP_DATABASE} https://cloud.example.com/public.php/webdav/Example.kdbx
t-h-e commented 1 week ago

I already knew that a hardcoded timeout is not a good idea 😅 I'm going to make it configurable, but don't expect any progress before end of October due to other obligations.

ItsOnlyBinary commented 1 week ago

:) no rush for me, I managed to build it with hardcoded 60 seconds (was a fun journey as it seems the docs for windows are a little outdated). Unfortunately I do not know c++ enough to actually create a pr to add the option.