Lockdown plugin stability#8
Draft
Rynaro wants to merge 1 commit into
Draft
Conversation
This fix addresses issue #7 where locking a note and moving it in the folder structure would cause the lock marker to be dismissed, leaving the encrypted content visible without unlock options. Changes: - Added rename event handler in main.ts to update lock registry when files/folders are moved or renamed - Added delete event handler to clean up stale lock entries - Extended LockRegistry with methods to update file/folder paths: - updateFilePath(): Updates a single locked file path - updateFolderPath(): Updates a single locked folder path - updateChildFilePaths(): Updates all locked files within a folder - updateChildFolderPaths(): Updates all locked subfolders within a folder - Properly handles password hashes and cached passwords during path updates - Updates UI (overlays and file explorer indicators) after path changes This prevents users from seeing encrypted content without unlock options and protects against accidental crypto corruption from editing encrypted content directly. Fixes #7 Co-authored-by: hlavezzo <hlavezzo@hey.com>
|
Cursor Agent can help with this pull request. Just |
🔍 Code Quality Report
✅ All checks passed!Code quality meets all standards. Ready to merge! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
📝 Description
This PR addresses a critical bug where moving or renaming a locked file or folder would cause the lock state to break, making encrypted content visible and editable, and potentially leading to data loss.
The solution involves:
renameanddeleteevents.LockRegistry) and refreshes the UI.LockRegistryhas been extended with methods (updateFilePath,updateFolderPath,updateChildFilePaths,updateChildFolderPaths) to handle path updates for individual files/folders and their children.Fixes #7
🎯 Type of Change
🧪 How Has This Been Tested?
Describe the tests you ran to verify your changes:
npm run buildnpm run lintTest Configuration:
📸 Screenshots (if applicable)
N/A
✅ Checklist
📋 Additional Notes
No dedicated test framework is currently set up, so testing was primarily manual and through build/lint checks.
🔗 Related Issues