Skip to content

Add file extension if user omitted (Keeshare)#6174

Merged
droidmonkey merged 1 commit intokeepassxreboot:developfrom
Colfenor:hotfix/Fix-Crash-when-editing-entries-keeshare
Feb 26, 2021
Merged

Add file extension if user omitted (Keeshare)#6174
droidmonkey merged 1 commit intokeepassxreboot:developfrom
Colfenor:hotfix/Fix-Crash-when-editing-entries-keeshare

Conversation

@Colfenor
Copy link
Copy Markdown
Contributor

Fixes #6081

The crash arises if the specified exported file path is missing either one of the
allowed file endings ".kdbx" or "kdbx.share".

In the KeeShare settings of the group the yellow warning ("your keepassXC version does not support sharing this container type. Supported extensions are: kdbx, kdbx.share") is correctly shown, however
the user is still able to progress the control flow via "ok" or "apply" button
and trigger the QASSERT in ShareExport.cpp which crashes the application.

The default file extension ".kdbx" is appended if the user omits it. Export then runs through.

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

Copy link
Copy Markdown
Member

@droidmonkey droidmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the problem, but it leaves the UI in an inconsistent state. The other problem with this solution is that it assumes an extension. We should just default to an unsigned container with the filename being as the user set it instead of forcing an extension. So the real fix is:

  1. If the file has extension .kdbx.share -> SignedContainer
  2. Else, UnsignedContainer
  3. Get rid of the assert and the error return.

*Fix keepassxreboot#6081 - Prevent assert and crash due to user entered data
@droidmonkey droidmonkey force-pushed the hotfix/Fix-Crash-when-editing-entries-keeshare branch from 4a0fbd6 to fc51c7f Compare February 26, 2021 19:05
Copy link
Copy Markdown
Member

@droidmonkey droidmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed unnecessary else condition.

@droidmonkey droidmonkey merged commit c9c19d0 into keepassxreboot:develop Feb 26, 2021
droidmonkey added a commit that referenced this pull request Jun 8, 2021
Added

- Show search bar when toolbar is hidden or in overflow [#6279]
- Show countdown for clipboard clearing in status bar [#6333]
- Command line option to lock all open databases [#6511]
- Allow CSV import of bare TOTP secrets [#6211]
- Retain file creation time when saving database [#6576]
- Set permissions of saved attachments to be private to the current user [#6363]
- OPVault: Use Text instead of Name for attribute names [#6334]

Changed

- Reports: Allow resizing of reports columns [#6435]
- Reports: Toggle showing expired entries [#6534]
- Save Always on Top setting [#6236]
- Password generator can exclude additional lookalike characters (6/G, 8/B) [#6196]

Fixed

- Allow setting MSI properties in unattended install [#6196]
- Update MainWindow minimum size to enable smaller verticle space [#6196]
- Use application font size when setting default or monospace fonts [#6332]
- Fix notes not clearing in entry preview panel in some cases [#6481]
- macOS: Correct window activation when restoring from tray [#6575]
- macOS: Better handling of minimize after unlock when using browser integration [#6338]
- Linux: Start after the system tray is available on LXQt [#6216]
- Linux: Allow selection of modal dialogs on X11 in Auto-Type [#6204]
- KeeShare: prevent crash when file extension is missing [#6174]
aswild added a commit to aswild/keepassxc that referenced this pull request Jun 15, 2021
Release 2.6.5

Added

- Show search bar when toolbar is hidden or in overflow [keepassxreboot#6279]
- Show countdown for clipboard clearing in status bar [keepassxreboot#6333]
- Command line option to lock all open databases [keepassxreboot#6511]
- Allow CSV import of bare TOTP secrets [keepassxreboot#6211]
- Retain file creation time when saving database [keepassxreboot#6576]
- Set permissions of saved attachments to be private to the current user [keepassxreboot#6363]
- OPVault: Use Text instead of Name for attribute names [keepassxreboot#6334]

Changed

- Reports: Allow resizing of reports columns [keepassxreboot#6435]
- Reports: Toggle showing expired entries [keepassxreboot#6534]
- Save Always on Top setting [keepassxreboot#6236]
- Password generator can exclude additional lookalike characters (6/G, 8/B) [keepassxreboot#6196]

Fixed

- Allow setting MSI properties in unattended install [keepassxreboot#6196]
- Update MainWindow minimum size to enable smaller verticle space [keepassxreboot#6196]
- Use application font size when setting default or monospace fonts [keepassxreboot#6332]
- Fix notes not clearing in entry preview panel in some cases [keepassxreboot#6481]
- macOS: Correct window activation when restoring from tray [keepassxreboot#6575]
- macOS: Better handling of minimize after unlock when using browser integration [keepassxreboot#6338]
- Linux: Start after the system tray is available on LXQt [keepassxreboot#6216]
- Linux: Allow selection of modal dialogs on X11 in Auto-Type [keepassxreboot#6204]
- KeeShare: prevent crash when file extension is missing [keepassxreboot#6174]

Release 2.6.6

Fixed

- Fix focusing search when pressing hotkey [keepassxreboot#6603]
- Trim whitespace from TOTP key input prior to processing [keepassxreboot#6604]
- Fix building on macOS [keepassxreboot#6598]
- Resolve compiler warnings for unused return values [keepassxreboot#6607]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Linux] Crash when editing entries (something with Keeshare)

2 participants