nextcloud-keeweb icon indicating copy to clipboard operation
nextcloud-keeweb copied to clipboard

Remember key file location

Open dodedodo opened this issue 3 years ago • 6 comments

Hello!

When opening keeweb for the first time, it is not very intuitive to open a nextcloud .kdbx file. The 'Open file' button opens a system dialog. To avoid confusion I've removed direct access to nextcloud-keeweb (/apps/keeweb) in favor of opening .kdbx files through the nextcloud files UI.

However, when opening a kdbx file in this way, keeweb does not remember the path to the key file. To be clear, this is only an issue when opening the database through nextcloud files.

Is there a way to fix this in jhas/nextcloud-keeweb, or should this be moved to keeweb/keeweb?

Thanks!

dodedodo avatar Jan 20 '22 14:01 dodedodo

In fact the only recommended way to use Keeweb in Nextcloud is to open a KDBX file in Nextcloud and not using the app icon.

I think it is the best solution to remove the app icon for future updates to avoid confusion like this. I don't know any solution to get Keeweb to remember the path to the key file, sorry.

arnowelzel avatar Jan 20 '22 18:01 arnowelzel

@arnowelzel Keeweb does remember the key file path when installed as a desktop app. This makes me suspect it has something to do with how nextcloud-keeweb implements this.

This also works: Open a database through nextcloud files, then open the base /apps/keeweb URL without ?open=abc. You'll see the database file path and keyfile path persisted.

Could it be because the file path includes a ?requesttoken=abc? This token changes everytime the user opens his database. Maybe the key file locations is actually saved, but not used because keeweb effectively opens a new file/url every time?

dodedodo avatar Jan 21 '22 14:01 dodedodo

Sorry, I don't know what causes this. I did not create Keeweb, I only maintain the integration for Nextcloud.

But anyway: using the app this way is not supported at all. The app is ONLY to open files in Nextcloud itself. If you need Keepass to open local files you should use native apps like https://keepassxc.org or similar.

The app icon will be removed with the next update to avoid such confusion. Also the "open local file" option as well when possible.

arnowelzel avatar Jan 21 '22 14:01 arnowelzel

I think my previous comment might've been a bit confusing. Let me rephrase.

I suspect this behaviour is caused by the changing ?requesttoken URL parameter added to the file path by nextcloud-keeweb. Is it possible to remove this ?requesttoken, or keep it consistent?

If I'm correct (not saying I am..) this issue is caused by the way nextcloud-keeweb implements this integration.

dodedodo avatar Jan 24 '22 14:01 dodedodo

Sorry for the delay - I was quite busy with other projects as well.

I don't know about "requesttoken". When I open a file in Nextcloud itself, it will not add "requesttoken".

And again: using KeeWeb for Nextcloud to open local files from you computer is not supported. This is a feature of KeeWeb itself which we can not easily remove from it, but this does not mean, that you should use it this way.

arnowelzel avatar May 15 '22 11:05 arnowelzel

In fact the only recommended way to use Keeweb in Nextcloud is to open a KDBX file in Nextcloud and not using the app icon.

I think it is the best solution to remove the app icon for future updates to avoid confusion like this. I don't know any solution to get Keeweb to remember the path to the key file, sorry.

I have to second this. When I first installed it, I didn't even know it associated itself with the file extension. I spent too long trying to figure out how to open a file stored in NC, that I fell back to using the file browser to select the kdbx file from my synced NC folder.

Gwindalmir avatar May 16 '22 04:05 Gwindalmir