Strongbox: IOS Webdav Issue - Can not open database

Created on 6 Aug 2020  路  11Comments  路  Source: strongbox-password-safe/Strongbox

Hi there,
Thanks for the great software, I've been using Strongbox for a number of months now, but with the current update () I can no longer access my databases which are stored on a Nextcloud Server (access via WebDav).

The error I get is as follows:

Error Reading Database File
The operation couldn't be completed.
(com.MattRajca.DAVKit.error error 404.)

I know that my Nextcloud server is accessible from my phone as I can access the webpage fine and other apps which access it via WebDav from the same phone (Joplin for example) can access it fine.

Any ideas what might be causing the issue??

Thanks for any help.

Most helpful comment

Yes, I can reproduce the issue with filenames that have odd characters (spaces, apostrophes) and this is down to URL percentage encoding/decoding causing Strongbox not to be able to find the file. I'll get a fix out for that shortly and Apple should hopefully release by tomorrow.

As a workaround you can make a copy of your database or just rename it not to have spaces/apostrophes.

All 11 comments

This should be fixed for you now in 1.49.1 - Could you verify and close?

Hi, I still have the same problem with 1.49.1. The Error is now "Could not get attributes of webdav file".
I tried adding the database file again but that also didn't work.
Every other non .kdbx file I try to open has a reasonable error, just keepass databases have the one above.

(The Nextcloud server is on 19.0.1 and iOS on 13.6.)

Hi,

I get the same error ("Could not get attributes of webdav file") after upgrading Strongbox on iOS this morning, with a kdbx file hosted on an owncloud server:

  • Strongbox: 1.49.1
  • iOS: 13.6
  • owncloud: 10.4.1

I tried removing the kdbx file, but I can't add it back.

This looks to be a different/newer error

@eguaj, @claudiiii Could you send the debug info from the About screen to [email protected]?

@strongbox-mark Here is the output from the About screen (nothing secret as I removed the database):

Databases Collection
----------------
----------------
Model: iPhone
System Name: iOS
System Version: 13.6
Ep: 1563913988
Flags: P[1[-287]110[97]0011]
App Version: com.markmcguill.strongbox [1.49.1 (2948)@efa76a1]
JSON Crash:
{}

When I try to add back my database, after entering the WebDAV URL and the credentials, the application correctly shows me the content of the Keepass directory with my KDBX. But when I touch the KDBX file, I get the error Could not get attributes of webdav file.

If it helps, here is the HTTP exchanges when I try to add back my KDBX file:

Client's request:

PROPFIND /remote.php/dav/files/xxx/Keepass HTTP/1.0
Host: xxx
X-Real-IP: xxx
X-Forwarded-For: xxx
X-Forwarded-Proto: https
X-Forwarded-Ssl: on
Connection: close
Content-Length: 92
Accept: */*
Content-Type: application/xml
Depth: 1
Cookie: xxx
Accept-Language: fr-fr
User-Agent: Strongbox/2948 CFNetwork/1128.0.1 Darwin/19.6.0
Accept-Encoding: gzip, deflate, br

<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:"><D:allprop/></D:propfind>

Server's response:

HTTP/1.0 207 Multi-Status
Date: Fri, 07 Aug 2020 09:24:48 GMT
Server: Apache
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Robots-Tag: none
X-Frame-Options: SAMEORIGIN
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Security-Policy: default-src 'none';
Vary: Brief,Prefer
DAV: 1, 3, extended-mkcol, 2
Content-Length: 1137
Connection: close
Content-Type: application/xml; charset=utf-8

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/files/xxx/Keepass/</d:href>
    <d:propstat>
      <d:prop>
        <d:getlastmodified>Mon, 03 Aug 2020 14:03:29 GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <d:quota-used-bytes>65287</d:quota-used-bytes>
        <d:quota-available-bytes>-3</d:quota-available-bytes>
        <d:getetag>"5f2819314e64d"</d:getetag>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/files/xxx/Keepass/xxx.kdbx</d:href>
    <d:propstat>
      <d:prop>
        <d:getlastmodified>Mon, 03 Aug 2020 14:03:22 GMT</d:getlastmodified>
        <d:getcontentlength>65287</d:getcontentlength>
        <d:resourcetype/>
        <d:getetag>"cf104ac29cd5aec2974dfd2e3c29dd1c"</d:getetag>
        <d:getcontenttype>application/octet-stream</d:getcontenttype>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <d:quota-used-bytes/>
        <d:quota-available-bytes/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Could it be related to the d:quota-used-bytes and d:quota-available-bytes being reported with a 404 Not Found status?

@eguaj - I don't think it will be the quota stuff.

I am unable to reproduce this error on Nextcloud 19 at the moment but I suspect the issue maybe to do with the Filename or Path used.

You're log above shows "xxx" - I presume because it is sensitive/private and you have done that?

If so, would you be able to share the path and filename with me privately on [email protected]?

That might be it, my database had a space in the filename. Without the space it works again. :+1:

Yes, I can reproduce the issue with filenames that have odd characters (spaces, apostrophes) and this is down to URL percentage encoding/decoding causing Strongbox not to be able to find the file. I'll get a fix out for that shortly and Apple should hopefully release by tomorrow.

As a workaround you can make a copy of your database or just rename it not to have spaces/apostrophes.

You're right: my KDBX filename had spaces in it.

If I rename my KDBX without spaces, then it works again.

Thanks!

All fixed for me; thank you very much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rob3c picture rob3c  路  3Comments

eike-fokken picture eike-fokken  路  7Comments

F3000 picture F3000  路  5Comments

shad0whawk picture shad0whawk  路  5Comments

mmcguill picture mmcguill  路  5Comments