Securing passwords safely in Nextcloud and working around a minor flaw

Posted on Posted in Uncategorized

I have had to work around this issue for some time now (as have many other Nextcloud and KeeWeb users).

Apparently from version 1.10 of NextCloud, the regex that had work flawlessly before no longer worked.

For those who are using Nextcloud and KeeWeb (I assume on any OS) and accessing the keepass database file directly using webdav, you will want to search for the string “incompatibleUserAgents” in the <nextcloud installation folder>/lib/base.php file and add the below lines to the end of the incompatibleUserAgents block.

                                // KeeWeb client
                                '/KeeWeb\/\d+\.\d+\.\d+/'

The end result will look like this;

                if (!is_array($incompatibleUserAgents)) {
                        $incompatibleUserAgents = [
                                // OS X Finder
                                '/^WebDAVFS/',
                                // Windows webdav drive
                                '/^Microsoft-WebDAV-MiniRedir/',
                                // KeeWeb client
                                '/KeeWeb\/\d+\.\d+\.\d+/'
                        ];
                }

You should now be able to use the desktop KeeWeb app using webdav. It has worked for me, hope it works for you too.

Alternatively you could just install the keeweb app into Nextcloud and access it direct from within the Nextcloud UI.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.