1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-09 18:29:18 +00:00

refactor: enhance uninstall safety and fix dock removal

- Add symlink/bundle_id/BOM validation to prevent injection attacks
- Fix Dock removal for /Applications symlink (use pwd not pwd -P)
- Fix brew uninstall test hanging (skip sudo in non-interactive mode)
- Remove unused SENSITIVE_DATA_REGEX
This commit is contained in:
Tw93
2026-01-17 09:49:42 +08:00
parent 12cacaa6cc
commit 060c48c48d
7 changed files with 22 additions and 33 deletions

View File

@@ -749,6 +749,8 @@ find_app_files() {
# Launch Agents by name (special handling)
# Note: LaunchDaemons are system-level and handled in find_app_system_files()
# Minimum 5-char threshold prevents false positives (e.g., "Time" matching system agents)
# Short-name apps (e.g., Zoom, Arc) are still cleaned via bundle_id matching above
if [[ ${#app_name} -ge 5 ]] && [[ -d ~/Library/LaunchAgents ]]; then
while IFS= read -r -d '' plist; do
local plist_name=$(basename "$plist")