Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • T tails
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 970
    • Issues 970
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 23
    • Merge requests 23
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • tails
  • tails
  • Issues
  • #18966
Closed
Open
Issue created May 05, 2022 by snip@snipContributor

KeePassXC offers to rename the default database on non-English locales

Hello,

By default, when creating a new password database, KeePassXC offers to save it using a localized file name by default (e.g., if Tails was started with the French language, Mots de passe.kdbx):

        oldFilePath =                                                                                                      
            QDir::toNativeSeparators(config()->get(Config::LastDir).toString() + "/" + tr("Passwords").append(".kdbx"));

(from src/gui/DatabaseWidget.cpp:1872-1873)

However, the default database name configured as LastOpenedDatabases in /etc/skel/.config/keepassxc/keepassxc.ini is always Passwords.kdbx, whatever the selected language. The same goes for the /usr/local/bin/keepassxc script.

This discrepancy can lead to a warning message, which can be reproduced as follows:

  1. Start Tails with a non-English locale (at least, a non-English language; e.g., French).
  2. Start KeePassXC, create a new password database, and save it using the default name suggested by KeePassXC (e.g., Mots de passe.kdbx), under the persistent volume.
  3. Close KeePassXC and start it again.

Upon starting KeePassXC again, the keepassxc script will then open a dialog window and offer to rename the newly created database to Passwords.kdbx (“Do you want to rename your KeePassXC database?”, etc.). I'm afraid that this may be slightly confusing for a new user, who followed the default steps and is then told that the name they used for the database wasn't, in fact, the default one.

Unfortunately, I couldn't think of any simple and satisfying way to solve this:

  • One could patch the KeePassXC translation files so that tr("Passwords") always translates to "Passwords", so that KeePassXC always offers to save the new database to Passwords.kdbx. However, this would require a binary patch, and this might also prevent other instances of Passwords in KeePassXC from being properly translated.

  • Alternatively, one could patch the default KeePassXC configuration file /etc/skel/.config/keepassxc/keepassxc.ini and the launcher script /usr/local/bin/keepassxc so that they always use the localized name for the default database. However, if a user doesn't always use the same language localization when starting Tails, the keepassxc script will offer to rename the database file after each switch from one language to another; and even if the user chooses to stop the script from prompting for this option, the default keepassxc.ini will not always be in sync with the actual name of the database, and KeePassXC will not always be able to automatically open the database, which might also be confusing for the user.

  • Maybe a third possibility would be for the launcher script to check if the ~amnesia/.config/keepassxc/keepassxc.ini is the default one (i.e., that it actually comes from the /etc/skel, and that it wasn't overwritten by a previous KeePassXC session) and, if so, tries to find whether there is a .kbdx file in the Persistent folder whose name is one of the possible KeePassXC-localized versions of Passwords.kdbx (maybe with a higher priority for the current language locale if there are several matches), and patch the ~amnesia/.config/keepassxc/keepassxc.ini file to have the LastOpenedDatabases setting point to this file instead. However, the behavior of KeePassXC would still depend on the session's language locale.

  • Along the same lines, the LastOpenedDatabases setting for KeePassXC can specify a comma-separated list of several database files. Each existing file in the list is then opened, and missing files are ignored silently (see src/core/Bootstrap.cpp:118-123). Therefore, if the default configuration file /etc/skel/.config/keepassxc/keepassxc.ini was to specify all possible localized versions of Passwords.kdbx in the LastOpenedDatabases setting, KeePassXC would automatically open any database file whose name corresponds to a localized name for the default database in KeePassXC. However, if the user has several matching database files in their Persistent folder (e.g., if they have both Passwords.kdbx and Mots de passe.kdbx), KeePassXC would then open them all.

  • Maybe a simpler solution would be to update the translations of the KeePassXC documentation in the Tails wiki (such as here, for the French translation) and to advise users to save their password database as Passwords.kdbx, regardless of the default name suggested by KeePassXC? Of course, this would only fix the issue for users following the Tails documentation, but that may be an acceptable middle ground.

In any case, whatever the retained solution, I'm OK to try and work on a patch and propose a merge request along the lines you would deem to be the best.

Also, apologies for this overly long report and for the absence of a proper solution to such a tiny issue!

Thanks a lot in advance!

snip

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking