KeePass2 no PUT at WebDAV-Sync with mono-3.x

Help
ziczac
2014-03-05
2014-11-28
  • ziczac

    ziczac - 2014-03-05

    Hi,

    after solving small problems, KeePass2-2.25 works fine at My Gentoo-Box with mono-2.8.2. I tried to upgrade mono to a recent version (3.2.8). After that, My database is killed at WebDAV sync. It seems that the KeePass/mono-3.x combo doesn't perform a PUT. It's the same with all mono-3.x versions.

    mono-2.8.2:
    "GET /DavSMarth/SMarth.kdbx HTTP/1.1" 200 52686
    "DELETE /DavSMarth/SMarth.kdbx.tmp HTTP/1.1" 404 1095
    "PUT /DavSMarth/SMarth.kdbx.tmp HTTP/1.1" 201 71
    "GET /DavSMarth/SMarth.kdbx HTTP/1.1" 200 52686
    "DELETE /DavSMarth/SMarth.kdbx HTTP/1.1" 204 -
    "MOVE /DavSMarth/SMarth.kdbx.tmp HTTP/1.1" 201 71

    mono-3.0.x, 3.2.8:
    "GET /DavSMarth/SMarth.kdbx HTTP/1.1" 200 52686
    "DELETE /DavSMarth/SMarth.kdbx.tmp HTTP/1.1" 404 1095
    "GET /DavSMarth/SMarth.kdbx HTTP/1.1" 200 52686
    "DELETE /DavSMarth/SMarth.kdbx HTTP/1.1" 204 -
    "MOVE /DavSMarth/SMarth.kdbx.tmp HTTP/1.1" 404 1095

    Sven

     
    Last edit: ziczac 2014-03-05
  • McLEI

    McLEI - 2014-03-20

    I can confirm this bug with mono 3.0.6 on Debian/jessie. KeePass 2.19 and 2.25.

     
  • Andreas Greiner

    Andreas Greiner - 2014-05-04

    Exactly same Problem: Lubuntu 14.10 (KeePass2 2.25, mono: Debian 3.2.8+dfsg-4ubuntu1)

    Are there any solutions?

    Would be fine! Thank you!

     
  • Paul

    Paul - 2014-05-04

    So it's a mono bug.
    KeePass uses file transactions to write files. These can be turned off, Tools > Options > Advanced, File Input/Output Connections, but you risk file corruption if something stops KeePass writing mid file.

    cheers, Paul

     
  • Andreas Greiner

    Andreas Greiner - 2014-05-04

    Hi Paul,

    thank you for your fast response!
    If i disable file transactions, the following message appears:
    "The new file's content does not match the data that KeePass was written, i.e. writing to the file has failed and it might be corrupted now. Please try saving again, and if that failes, save the database to a different location"
    Same problems with a other workstation (lubuntu 14.10, KeePass 2.25, Mono 3.4.1).
    Is there maybe a change of the instruction set in the newer Mono-versions?

     
  • Paul

    Paul - 2014-05-04

    It would seem to be an issue with the FTP class in mono 3. Are you able to roll back to mono 2 and test?

    cheers, Paul

     
  • Andreas Greiner

    Andreas Greiner - 2014-05-04

    I made a test on a separate machine: At first i installed lubuntu 13.10 and keepass 2.23 (mono 2.10.8.1) -> webdav works
    -then i installed keepass 2.25 -> also works
    -then i upgraded mono to 3.27 -> webdav failed (delete file on webdav)
    -disabled file transaction -> same error i described before

    Should i test anything else?

    I hope this is a help for you...

    andy

     
  • Paul

    Paul - 2014-05-04

    Thanks for testing, you've confirmed it's a mono bug. I suggest you report it on the mono forums.

    I can't see how KeePass can work around the bug as it won't save even with file transactions turned off, so it's stick with mono 2 for now.

    cheers, Paul

     
  • Mark Schaefer

    Mark Schaefer - 2014-11-28

    I've got the same problem with Ubuntu 14.04 and KeePass 2.25.
    As a workaround I had to manually install the latest version of mono (3.10) (see here http://www.mono-project.com/docs/getting-started/install/linux/); this fixed the problem with the wrong http Methods.

    However, no combination of mono and KeePass or installation of root certificates in mono or KeePass option tweaking could fix the Problem with SSL/TLS connections via https. For this I had to install a local Apache httpd 2.4 (<2.4 won't do) with the following configuration (don't forget to activate the modules proxy... and header):

    SSLProxyEngine On
    RequestHeader edit Destination ^http https early
    
    <Location /keepass>
            Dav On
            ProxyPass https://<externalserver>/keepass
            ProxyPassReverse https://<externalserver>/keepass
    </Location>
    

    In KeePass, I could now open http://localhost/keepass/<file> thus avoiding the certificate problems of mono.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks