Fix read-only bypass via Cut/Delete context menu commands (Issue #444) #450
No reviewers
Labels
No labels
Area-Accessibility
Area-Build
Area-CodeCompletion
Area-Document
Area-Documentation
Area-Editing
Area-Folding
Area-Highlighting
Area-i18n
Area-Indentation
Area-NetFx
Area-Rendering
Area-Search
Area-Snippets
dependencies
duplicate
Feedback Needed
help wanted
invalid
Issue-Bug
Issue-Discussion
Issue-Enhancement
Issue-Performance
Issue-Question
on-hold
Resolution-Answered
Resolution-By Design
Resolution-Duplicate
Resolution-Fixed
Resolution-Won't Fix
Up-for-Grabs
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-icsharpcode/AvalonEdit!450
Loading…
Reference in a new issue
No description provided.
Delete branch "JyslaFancy/fix/issue-444-cut-enabled-when-readonly"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Fixes #444: Cut and Delete commands remain enabled in context menu when IsReadOnly=true.
Vulnerability
When , the Cut and Delete commands remained enabled in the context menu and via keyboard shortcuts (Ctrl+X, Del). This allowed bypassing the read-only protection — a user could delete or move content from a read-only document.
Root Cause
The handlers for Cut () and Delete () only checked whether text was selected. They never verified that the document was writable via .
Fix
Attack Vector
Context menu or keyboard shortcut (Ctrl+X, Del) on a read-only with selected text.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.