Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
varjolintu opened this issue Oct 12, 2024 · 4 comments
Open
Assignees
Labels
Milestone

Comments

@varjolintu
Copy link
Member

varjolintu commented Oct 12, 2024

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

@droidmonkey

This comment was marked as outdated.

@varjolintu
Copy link
Member Author

Just having a note in the entry does not trigger this. Custom data is needed.

@droidmonkey
Copy link
Member

The note is a distraction, has nothing to do with the issue

@droidmonkey
Copy link
Member

Nevermind these two issues are completely unrelated

@phoerious phoerious removed the bug label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To triage
Development

No branches or pull requests

3 participants