Using enforced config seems to break local LanguageFile preference

Help
Sati
2013-12-06
2013-12-06
  • Sati

    Sati - 2013-12-06

    Using: KeePass 2.24 on Windows 7

    Hi!

    In preparing for a keepass rollout I have come accross the following problem:

    • After the initial install I configured use of a german language file which worked fine
    • Then after adding enforced settings, the UI would always come up in English although I did not enforce language preferences, regardless of whether I tried to change language via UI or within the local config file
    • Further research showed that the (ignored) LanguageFile line was removed from local config after starting and then closing KeePass

    Here is my %PROGRAMFILES%\KeePass Password Safe 2\KeePass.config.enforced.xml

    <?xml version="1.0" encoding="utf-8"?>
    <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <Meta>
            <!-- Use local (user) configuration file for all settings that are not enforced -->
            <PreferUserConfiguration>true</PreferUserConfiguration>
        </Meta>
        <Application>
            <Start>
                <!-- Disable automatic update checks -->
                <CheckForUpdate>false</CheckForUpdate>
                <CheckForUpdateConfigured>true</CheckForUpdateConfigured>
            </Start>
        </Application>
     </Configuration>
    

    And here is my %APPDATA%\KeePass\KeePass.config.xml before staring KeePass with the enforced config file ...

    <?xml version="1.0" encoding="utf-8"?>
    <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <Meta>
            <PreferUserConfiguration>false</PreferUserConfiguration>
            <OmitItemsWithDefaultValues>true</OmitItemsWithDefaultValues>
        </Meta>
        <Application>
            <LanguageFile>German.lngx</LanguageFile>
        </Application>
    </Configuration>
    

    ... and the start of that file after closing KeePass:

    <?xml version="1.0" encoding="utf-8"?>
    <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <Meta>
            <PreferUserConfiguration>false</PreferUserConfiguration>
            <OmitItemsWithDefaultValues>true</OmitItemsWithDefaultValues>
        </Meta>
        <Application>
            <LastUsedFile>
                <Path />
                <CredProtMode>Obf</CredProtMode>
                <CredSaveMode>NoSave</CredSaveMode>
            </LastUsedFile>
    [... REMOVED FURTHER IRRELEVANT LINES ...]
    

    Am I missing something or could this be a bug?

    Greetings,
    Sati

     
  • Dominik Reichl

    Dominik Reichl - 2013-12-06

    Comments in enforced configuration files are unsupported. If you remove them, it works fine.

    For KeePass 2.25, I've now added support for comments in inner nodes. Here's the latest development snapshot for testing:
    http://keepass.info/filepool/KeePass_131206.zip

    Thanks and best regards,
    Dominik

     
  • Sati

    Sati - 2013-12-06

    Oh shoot! I should have thought of trying that!
    Thanks a lot for the quick response, Dominik!

    Greetings,
    Sati

     
    Last edit: Sati 2013-12-06

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks