Skip to content

Harden tui launcher install and removal - #9150

Open
rihadroshan wants to merge 3 commits into
omacom:quattrofrom
rihadroshan:quattro
Open

Harden tui launcher install and removal#9150
rihadroshan wants to merge 3 commits into
omacom:quattrofrom
rihadroshan:quattro

Conversation

@rihadroshan

Copy link
Copy Markdown

Port webapp-install's name and desktop-value guards to tui-install.

Problem. omarchy-tui-install wrote its .desktop with raw values. A / in the app name became directory levels (unreachable by omarchy-tui-remove, and ../ escaped ~/.local/share/applications), and a newline could inject a second Exec= key. Its sibling omarchy-webapp-install already solves both with require_plain_name + desktop_string_escape.

Fix.

bin/omarchy-tui-install: add require_plain_name (reject /) before any launcher/icon work, add desktop_string_escape for Name/Comment/Exec/Icon.
bin/omarchy-tui-remove: index launchers and delete the found file (like webapp-remove), so legacy nested entries are reachable.
test/shell.d/tui-install-hardening-test.sh: 7 assertions covering slash/../ rejection, early interactive refusal, newline injection, round-trip, nested legacy removal, quiet no-dir removal.

Verified: new test 7/7 pass; webapp-name, webapp-install-escaping, webapp-install, launcher-remove, desktop-entry-launch, refresh-config all green.

Port webapp-install's name and desktop-value guards to tui-install: a
name can no longer nest the launcher (slash), climb out of the
applications directory (../), or inject extra desktop-entry keys via a
newline in Name/Comment/Exec/Icon. tui-remove now deletes the indexed
launcher like webapp-remove, so entries left nested by older installs
stay removable.

Test: shell (tui-install-hardening-test.sh)
Harden tui launcher install and removal
@rihadroshan rihadroshan changed the title Harden tui launcher install and removal - #1 Harden tui launcher install and removal Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant