GithubHelp home page GithubHelp logo

Comments (6)

cternes avatar cternes commented on June 16, 2024

I'll take a look at it.

from openkeepass.

cternes avatar cternes commented on June 16, 2024

If I test with the code you provided it works perfectly on my system when I open the database with KeePass.

KeePassFile mDatabase = KeePassDatabase.getInstance(ResourceUtils.getResource("test1.kdbx")).openDatabase("test");
    Group parentGroup = mDatabase.getRoot().getGroups().get(0);
    Entry entry = mDatabase.getEntries().get(0);
    Entry newEntry = new EntryBuilder(entry).username("hello1").buildWithHistory();
    new GroupBuilder(parentGroup).removeEntry(entry).addEntry(newEntry).build();

    KeePassDatabase.write(mDatabase, "test", ResourceUtils.getResource("test1.kdbx"));

Can you provide a bit more details?

  1. Is it working if you're trying it on a desktop system and not Android?
  2. You mentioned that

The password is "unreadable" for other keepass viewers

what are these other keepass viewers? Does it work with the original KeePass program?
3. Can you provide a testcase that is not working? As mentioned, the code above works for me.

from openkeepass.

ThomasSHA avatar ThomasSHA commented on June 16, 2024

Well it seems to be a problem with Android only.
Tried it on the Desktop and it works without problems.
On Android the same code results in a "destroyed" password field.

to answer your questions:

  1. It works on Desktop system
  2. I tried the "original" KeePass Password Safe v2.35 on Desktop. Keepass2Android and KeepassDroid
  3. I tried the same Code, on Android and Desktop. Works on Desktop, doesn't work on Android...

Below the file in it's different stages...
https://we.tl/dKwkjeJIeM

from openkeepass.

ThomasSHA avatar ThomasSHA commented on June 16, 2024

Just a short update:
I might have found a new "hint".
It seems like the gzip compression breaks the file on Android.

I just created a new kdbx file with the windows client and set compression to "none".
Now editing and saving files with you library seems to work without problems.

from openkeepass.

cternes avatar cternes commented on June 16, 2024

Thanks for the hint, I can reproduce the issue and trying to fix it.

from openkeepass.

cternes avatar cternes commented on June 16, 2024

I finally found the issue. The problem is not the gzip compression, it's the behavior of Simple XML on Android. It does not preserve the order of XML tags on Android.

However, I managed to fix the issue.

from openkeepass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.