Skip to content

If entry has custom data it is set to modified state when pressing OK #11352

@varjolintu

Description

@varjolintu

Overview

If an entry has custom data and it is edited, pressing OK without changing anything will trigger CustomData::updateLastModified() and the entry will be set as modified even if no data has been changed.

In this case the call stack shows:

Database::markAsModified() Database.cpp:957
ModifiableObject::emitModified() ModifiableObject.cpp:63
CustomData::copyDataFrom(const CustomData *) CustomData.cpp:155
EditEntryWidget::updateEntryData(Entry *) const EditEntryWidget.cpp:1217
EditEntryWidget::commitEntry() EditEntryWidget.cpp:1184
EditEntryWidget::acceptEntry() EditEntryWidget.cpp:1205
main main.cpp:218

Regression from e4eee89

Steps to Reproduce

  1. Have an entry with Custom Data (e.g. Browser Integration has set allow/deny rule).
  2. Edit entry.
  3. Press Ok without changing anything -> entry state changes to modified.

Expected Behavior

If nothing has been changed, do not change the entry state. Maybe CustomData::copyDataFrom() shouldn't change the last modified value?

Actual Behavior

Entry is set to modified state.

KeePassXC - Version 2.8.0-snapshot (current develop branch)
Revision: d57d167

Operating System: macOS

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

To triage

Relationships

None yet

Development

No branches or pull requests

Issue actions