Repository navigation
FIX: bind the desktop helper to the shell's desktop and limit uninstall to rexplorer's own files - #92
Merged
Conversation
…ll to rexplorer's own files The desktop helper decided "this is the desktop" from window class names, which any program can copy: a right-click on a forged list made it build a menu for, and act on, the real desktop items. It now also requires the list to belong to the shell's process, reads the list with a timeout, drops a menu request older than two seconds, and compares the selection item by item before Delete. --register registers only the installed copy. Uninstall and restore-explorer.ps1 delete a recorded file only when its name is one of ours and its folder is one install writes to, and a recorded registry value or key only under the keys rexplorer writes. Home answers the shell's drag image request once, during a drag Home started, instead of trusting any posted message's pointer. A clean exit removes its crash marker as its last step. A bitmap posted after a window is destroyed is taken back by its worker instead of staying queued. The session file keeps the right active tab when a tab is skipped, and an item inside a recycled folder no longer gets the packaged-app commands.
4 tasks
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.
Fixes the findings of the pre-1.0 security review of the desktop helper, install and scripts (#60), and the eight low-severity findings of the review of this diff. Changes are under Unreleased in the changelog; the crate version stays 1.0.0-rc.2.
Changes
is_desktop_list). List reads useSendMessageTimeoutW; the timed read runs before any COM call into Explorer, and a menu request older than two seconds is dropped. Delete compares the selection item by item with the menu's items. A right-drag replay overtaken by the user's release no longer leaves the button down, and a stale swallowed key is cleared.--registerregisters the installed copy and refuses, in both languages, when there is none.revertandscripts/restore-explorer.ps1delete a recorded file only when its name is ours and its folder is the install, Programs or Startup folder, and a registry value or key only under the keys rexplorer writes.scripts/install.ps1no longer builds from source inside a release zip..sehfile as the last step ofmain, so the crash folder only fills on real crashes.Mailbox::post_whilelets a worker take its payload back when the window is gone, which closes a bitmap leak on destroy in Home icons and thumbnails.active=counts among the tabs actually written.SECURITY.mdnames the review's findings and what was fixed, and states what still has no timeout.How it was tested
cargo build --release --locked --all-targetswith-D warnings,cargo test --release --lockedthree times (app 272, core 256, data_ops 11),cargo clippy --workspace --all-targets --locked -- -D warnings.scripts\smoke.ps1 -Hostedon a copy of the release exe: 31 PASS, 8 SKIP, 0 FAIL, includinginstall-scratch,install-scriptsandcrash-recovery.Not done
SECURITY.mdsays so.Issues
Closes #60.
Progress on #84. Tracking: #71.