Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/management/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ cleanup_cache() {
for cache_path in "${cache_locations[@]}"; do
if [[ "$cache_path" == *"*"* ]]; then
# Glob pattern
for item in $cache_path 2>/dev/null; do
for item in $cache_path; do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

Expanding $cache_path without quotes causes the shell to perform word splitting. If any directory in the path (such as the user's home directory) contains spaces, the loop will break the path into multiple invalid segments, causing the cleanup to fail. Refactor the cleanup_cache function to safely handle paths with spaces by avoiding unquoted variable expansion for globs (e.g., using shopt -s nullglob).

if [[ -e "$item" ]]; then
log INFO "Removing: $item"

Expand Down
Loading