Files
booksprite/frontend/device
Christo 50a7fc66a6 SDL: shell-escape openLink and external dict lookup args (#15491)
A PDF-controlled URL flowed into `os.execute` via single-quote
concatenation in `Device:openLink`. An embedded `'` in the URL closed
the intended quoting and the remainder was interpreted by the shell,
giving arbitrary command execution as the KOReader user once the user
chose "Open in browser" on an external link.

The same pattern existed in `doExternalDictLookup`'s command path:
the dictionary text was concatenated directly into the shell command
and `cleanSelection` does not remove shell metacharacters.

Use `util.shell_escape` at both sinks. The helper has been in the
codebase for years (used e.g. in `util.lua:928` for `df -kP`) and
quotes args with single quotes plus `'\''` escaping.

Fixes #15490
2026-06-01 18:38:31 +02:00
..
2026-04-29 17:24:11 +02:00
2024-09-24 16:08:58 +02:00
2022-10-29 22:55:20 +02:00