Skip to content
New issue

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

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

Already on GitHub? # to your account

When creating or editing entry, Setup TOTP reset fields to original state #6838

Closed
woowoo803 opened this issue Aug 13, 2021 · 3 comments · Fixed by #9874
Closed

When creating or editing entry, Setup TOTP reset fields to original state #6838

woowoo803 opened this issue Aug 13, 2021 · 3 comments · Fixed by #9874

Comments

@woowoo803
Copy link

Overview

When manually creating a new login with TOTP, on completion of the "setup TOTP" step it wipes other information entered previously. Note this only happens with a new entry, if adding TOTP to an existing entry it does not happen.

Steps to Reproduce

  1. Start a new login entry
  2. Enter title, username, password, URL
  3. Click Entries -> TOTP -> Set up TOTP
  4. Enter a TOTP code etc.
  5. Click OK
  6. Title through URL entered previously are wiped.

Expected Behavior

Set up of TOTP should leave previous entries intact

Actual Behavior

When the Set up TOTP step is complete and click on Ok (within the TOTP pop-up) the Title through URL entries are wiped

Context

This only happens with a new entry, so when the Title through URL information is entered just before selecting Set up TOTP. If Set up TOTP is used with an existing entry this does not occur.

[NOTE]:
KeePassXC - VERSION 2.6.6
Revision: REVISION 9c108b9

[NOTE]:
Operating System: Windows

@woowoo803 woowoo803 added the bug label Aug 13, 2021
@droidmonkey droidmonkey added this to the v2.7.0 milestone Aug 14, 2021
@droidmonkey
Copy link
Member

Found it, we were reloading data from the entry if it was modified outside of the edit widget. This doesn't make sense when creating a new entry (all data is blank), so when TOTP was set it triggered the modified signal on the empty entry and blanks out the fields. Adding a creation guard to that signal fixed the problem.

@droidmonkey
Copy link
Member

Oof nevermind, the fix to this will require the much dreaded complete rewrite to the edit entry widget.

@droidmonkey droidmonkey self-assigned this Aug 14, 2021
@droidmonkey droidmonkey changed the title Setup TOTP clears other fields When creating or editing entry, Setup TOTP reset fields to original state Aug 14, 2021
@droidmonkey droidmonkey modified the milestones: v2.7.0, v2.7.1 Mar 21, 2022
@phoerious phoerious modified the milestones: v2.7.1, v2.7.2 Apr 12, 2022
@phoerious phoerious modified the milestones: v2.7.2, v2.8.0 Oct 18, 2022
@michaelk83
Copy link

The fix to this will require the much dreaded complete rewrite to the edit entry widget.

I don't know if such a rewrite would be part of #8228 for 2.8.0 (?), but if not, a quick workaround would be to check for unsaved changes before starting the TOTP setup, and prompt the user to save first.

droidmonkey added a commit that referenced this issue Sep 24, 2023
* Fix #9847 - don't provide TOTP values if settings are blank or completely wrong
* Fix #6838 - don't reset the ui when creating a new entry and applying TOTP to it
droidmonkey added a commit that referenced this issue Sep 24, 2023
* Fix #9847 - don't provide TOTP values if settings are blank or completely wrong
* Fix #6838 - don't reset the ui when creating a new entry and applying TOTP to it
* Move totp source into the core folder
droidmonkey added a commit that referenced this issue Nov 29, 2023
* Fix #9847 - don't provide TOTP values if settings are blank or completely wrong
* Fix #6838 - don't reset the ui when creating a new entry and applying TOTP to it
* Move totp source into the core folder
droidmonkey added a commit that referenced this issue Jan 6, 2024
* Fix #9847 - don't provide TOTP values if settings are blank or completely wrong
* Fix #6838 - don't reset the ui when creating a new entry and applying TOTP to it
* Move totp source into the core folder
droidmonkey added a commit that referenced this issue Jan 6, 2024
* Fix #9847 - don't provide TOTP values if settings are blank or completely wrong
* Fix #6838 - don't reset the ui when creating a new entry and applying TOTP to it
* Move totp source into the core folder
droidmonkey added a commit that referenced this issue Jan 30, 2024
* Fix #9847 - don't provide TOTP values if settings are blank or completely wrong
* Fix #6838 - don't reset the ui when creating a new entry and applying TOTP to it
* Move totp source into the core folder
droidmonkey added a commit that referenced this issue Feb 4, 2024
* Fix #9847 - don't provide TOTP values if settings are blank or completely wrong
* Fix #6838 - don't reset the ui when creating a new entry and applying TOTP to it
* Move totp source into the core folder
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants