PhilippC / PhilippC/keepass2android

[BUG] WebDAV path with CJK characters causes failure in syncing, reporting unexpected characters in path

Open
#3,167 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.2k
Forks
478
Avg merge
1h 4m
Merged PRs (30d)
2

Description

Checks
  • I have read the FAQ section, searched the open issues, and still think this is a new bug.
Describe the bug you encountered:

Keepass2Android on my phone recently stopped syncing with the remote database, using the local cache, and asked me to manually merge the modification. However, when I click the sync and merge, it pops up a red/warning snackbar with the string CouldNotSaveToRemote (Could not save to source file: %1$s. Save again or use the Synchronize menu when file is accessible again.) where the interpolated string is something like unexpected char 0x....(the unicode of the first CJK character in the path) in the Destination value: <the WebDAV path> . It disappears and gets replaced by another blue/info snackbar with the SynchronizedDatabaseSuccessfully string (Database synchronized successfully!) so fast instantly, and users are prevented from taking a screenshot because of the confidential setting, so it's challenging to even finish reading or remember them exactly. And it actually didn't sync successfully even the snackbar claims it did. Every time trying on merging, it creates a new file named <dbname>.kdbx.tmp.<8 digits> under the same directory instead of updating the original .kdbx.

By the way, I recommend considering either adding an action button allowing users to confirm the message, or giving it a longer timeout duration.

Describe what you expected to happen:

I have been using this path for longer than 6-7 years, and in the past it worked well without any trouble. I wonder if any change recently just broke the support for CJK characters?

What version of Keepass2Android are you using?

1.14-r4

Which version of Android are you on?

Android 12 Snow Cone (API31)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named in the report. Start by reproducing a sync-and-merge using a WebDAV path containing CJK characters on Android 12, then trace the WebDAV save path and temporary-file handling. Done means the original database is updated successfully without an incorrect failure message or stray temporary file.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
mobile, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.