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-02-10 08:04:24 +01:00
2024-12-25 17:29:40 +01:00
2019-03-01 17:29:04 +01:00
2016-04-22 20:13:44 +08:00
2026-05-10 13:01:07 +02:00
2024-11-25 22:55:57 +01:00
2014-03-23 16:53:05 +08:00
2026-05-24 08:14:27 +02:00
2026-03-23 18:07:29 +02:00
2024-12-18 19:40:22 +01:00

KOReader

KOReader is a document viewer primarily aimed at e-ink readers.

AGPL Licence Latest release Gitter Mobileread Build Status Coverage Status Weblate Status

Download • User guide • Wiki • Developer docs

Main features

  • portable: runs on embedded devices (Cervantes, Kindle, Kobo, PocketBook, reMarkable), Android and Linux computers. Developers can run a KOReader emulator in Linux and MacOS.

  • multi-format documents: supports fixed page formats (PDF, DjVu, CBT, CBZ) and reflowable e-book formats (EPUB, FB2, Mobi, DOC, RTF, HTML, CHM, TXT). Scanned PDF/DjVu documents can also be reflowed with the built-in K2pdfopt library. ZIP files are also supported for some formats.

  • full-featured reading: multi-lingual user interface with a highly customizable reader view and many typesetting options. You can set arbitrary page margins, override line spacing and choose external fonts and styles. It has multi-lingual hyphenation dictionaries bundled into the application.

  • integrated with calibre (search metadata, receive ebooks wirelessly, browse library via OPDS), Wallabag, Wikipedia, Google Translate and other content providers.

  • optimized for e-ink devices: custom UI without animation, with paginated menus, adjustable text contrast, and easy zoom to fit content or page in paged media.

  • extensible: via plugins

  • fast: on some older devices, it has been measured to have less than half the page-turn delay as the built in reading software.

  • and much more: look up words with StarDict dictionaries / Wikipedia, add your own online OPDS catalogs and RSS feeds, over-the-air software updates, an FTP client, an SSH server, …

Please check the user guide and the wiki to discover more features and to help us document them.

Screenshots

Installation

Please follow the model specific steps for your device:

Android • Cervantes • Kindle • Kobo • Linux • Pocketbook • reMarkable

Development

Setting up a build environment • Collaborating with Git • Building targets • Porting • Developer docs

Support

KOReader is developed and supported by volunteers all around the world. There are many ways you can help:

Right now we only support liberapay donations.

Contributors

Last commit Commit activity

S
Description
BookSprite: a personal KOReader fork for Kobo, with isolated installation, OTA updates and USB recovery.
Readme AGPL-3.0
46 MiB
0 Stars 1 Watchers 0 Forks
Languages
Lua 96.8%
Shell 2.1%
Python 0.7%
Makefile 0.2%
Erlang 0.1%