The XML Replace feature marks entries as modified even when the replacement operation does not make any actual changes to the entry.
Select nodes: //Entry/String[starts-with(Key,'AndroidApp')]/Value
Action: Replace data
Data: Inner text
Find what: androidapp://org.mozilla.firefox_beta
Replace with: androidapp://org.mozilla.firefox_beta
Some entries are marked as modified, while others are not, even though the replacement value is identical to the original value.
The entries that are marked as modified appear to have some internal difference, but there is no visible difference in the replaced value.
Please see the attached screenshot showing part of the History output. Entries marked as modified are indicated by ".." in the Modified column.
KeePass 2.61.1
Windows 11
Moving to open feature requests.
Thanks and best regards,
Dominik
Hi,
May I ask whether you were already aware of this behavior before my report, or is this the first time you've seen it?
Also, if I provide a database that reliably reproduces the issue, would you be willing to investigate and potentially fix it?
At the moment, I'm hesitant to use XML Replace because this behavior makes me question the integrity of the data. If entries can be marked as modified even when no visible changes are made, I'm concerned there could be other unintended side effects that are not immediately apparent.
Thank you.
Ticket moved from /p/keepass/bugs/2437/
Also, it's for KeePass 2.x, not 1.x.
I can't edit my post, but the modified entries indicate "..." (three dots) in the Modified column instead of ".." (two dots).
Use the screenshot as the source of truth
I understood your ticket, can reproduce the behavior and think that your suggestion is a good idea. It isn't expected from the current code though; additional code will be required to realize it. It's an enhancement/improvement, not a bug, which is why I moved the ticket.
Best regards,
Dominik
There are multiple circumstances how this could occur. For checking your specific case, could you please provide an example database file for reproducing the issue?
Thanks and best regards,
Dominik
I got a working example.
Attached database has empty master key (if you wish you can also create the database yourself, as it is default database).
In "Sample Entry" add "Test" field with this value (multiple lines):
¿
0
In "Sample Entry #2" add "Test" field with this value (multiple lines):
?
a
Don't save the database.
Perform XML Replace:
Select nodes: //Entry/String[starts-with(Key,'Test')]/Value
Action: Replace data
Data: Inner text
Find what: androidapp://org.mozilla.firefox_beta
Replace with: androidapp://org.mozilla.firefox_beta
check Find → History.
You will see both entries as modified with "..." as modified field