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

Improve attachment handling #6606

Merged
merged 3 commits into from
Aug 22, 2021
Merged

Conversation

phoerious
Copy link
Member

@phoerious phoerious commented Jun 9, 2021

  • Securely delete temporary attachment files after closing the database
  • Prevent leaking of metadata through file names
  • Reduce internal copying of attachments and clear everything on lock
  • Do not keep handles open so PDFs can be viewed in Adobe Acrobat
  • Watch for external changes
  • Enable attachment renaming by clicking selection

Fixes #2400
Fixes #3130
Fixes #5950
Fixes #5839
Fixes #1695
Fixes #6648

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)
  • ✅ New feature (change that adds functionality)

@phoerious phoerious added this to the v2.7.0 milestone Jun 9, 2021
@droidmonkey droidmonkey self-requested a review June 9, 2021 02:57
@phoerious phoerious marked this pull request as ready for review June 9, 2021 19:05
@phoerious
Copy link
Member Author

Ready for initial review @droidmonkey.

@phoerious phoerious force-pushed the feature/improve-attachment-handling branch from c8fc32a to 1ec9380 Compare June 9, 2021 19:17
@phoerious phoerious force-pushed the feature/improve-attachment-handling branch 3 times, most recently from 59432a3 to f1b94a7 Compare June 12, 2021 12:26
phoerious and others added 3 commits July 13, 2021 22:56
Externally opened attachments are now lifecycle-managed properly.

The temporary files are created with stricter permissions and entirely
random names (except for the file extension) to prevent meta data leakage.

When the database is closed, the files are overwritten with random
data and are also more reliably deleted than before.

Changes to the temporary files are monitored and the user is asked
if they want to save the changes back to the database (fixes #3130).

KeePassXC does not keep a lock on any of the temporary files, resolving
long-standing issues with applications such as Adobe Acrobat on Windows
(fixes #5950, fixes #5839).

Internally, attachments are copied less. The EntryAttachmentsWidget
now only references EntryAttachments instead of owning a separate copy
(which used to not be cleared properly under certain circumstances).
@droidmonkey droidmonkey force-pushed the feature/improve-attachment-handling branch from f1b94a7 to bb2c9fd Compare July 14, 2021 02:56
Copy link
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 made an improvement to the save/discard dialog, it will only be shown once no matter how many times a file change is detected. Before it would shown another dialog for the same file many times.

I also fixed the attachment widget buttons getting scrunched up in the advanced tab of the edit entry widget.

@droidmonkey droidmonkey merged commit 986fa42 into develop Aug 22, 2021
@droidmonkey droidmonkey deleted the feature/improve-attachment-handling branch August 22, 2021 21:09
@phoerious phoerious added pr: new feature Pull request that adds a new feature and removed new feature labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: new feature Pull request that adds a new feature ux
Projects
None yet
2 participants