Skip to content

install.sh --purge-cache should validate XDG_CACHE_HOME and HOME derived paths #3499

Description

@Widthdom

Problem

install.sh --uninstall --purge-cache derives a cache directory from XDG_CACHE_HOME or HOME and recursively removes it without an explicit safe-root check.

Evidence

install.sh uses:

local cache_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/cdidx"
rm -rf "$cache_dir"

Expected behavior

Normalize the cache path and assert it is under an expected user cache root before recursive deletion. Failure to validate should abort with a clear diagnostic.

Labels

bug, security

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecurity

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions