Skip to content

Reject divider characters that break the Kometa run command - #1980

Merged
bullmoose20 merged 1 commit into
Kometa-Team:developfrom
HoneyBearTech:fix-divider-quote-backslash
Nov 25, 2026
Merged

bullmoose20 merged 1 commit into
Kometa-Team:developfrom
HoneyBearTech:fix-divider-quote-backslash

Conversation

@HoneyBearTech

@HoneyBearTech HoneyBearTech commented Nov 22, 2026 •

Copy link
Copy Markdown

Related Issues

N/A

What type of PR is this?

  • Bug Fix (non-breaking change which fixes an issue)
  • Feature/Tweak (non-breaking change which adds new functionality or enhances existing functionality)
  • Breaking Change (fix or feature that would break any existing functionality for users)
  • Documentation Update
  • Other

Description

A divider of " or \ on the Kometa page produced a run command that shlex.split can't parse (--divider """ / --divider "\", "No closing quotation"). launch_kometa_command didn't catch the ValueError:

  • Start button: /start-kometa returned a 500 error page.
  • Queued run after the Plex maintenance window: the start raised inside the maintenance guard, and the run never started.

Changes:

  • _runCommand.js: the divider field refuses " and \ with a message naming them. Every other character accepted today is still accepted.
  • process_lifecycle.py: launch_kometa_command catches the parse error and returns (False, "Invalid run command: ...") before anything starts.
  • quickstart.py: /start-kometa maps that result to HTTP 400, as it already does for an invalid processing mode. The queued start logs the failure, and the maintenance loop keeps running.

Tests:

  • JS: " and \ are refused. ', #, $ and = are still accepted.
  • Python: an unparseable command returns an error and starts no process. /start-kometa returns 400 with the message. A malformed queued command is logged and the maintenance loop continues.

The new tests fail without the fix. npm test, npm run build, eslint, pytest -m "not e2e", ruff and black (-l 180) pass.

Which Environment Did You Test On?

  • Local Install (Windows/Linux/Mac via python quickstart.py)
  • Windows Executable
  • Linux Executable
  • macOS Executable
  • Docker
  • Other

Tested on Linux. The Windows (posix=False) parsing path is covered only through shlex's non-POSIX mode, not on a Windows machine.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Signed-off-by: Sean Stoube <31805425+HoneyBearTech@users.noreply.github.com>
@bullmoose20
bullmoose20 merged commit fdeeeef into Kometa-Team:develop Nov 25, 2026
13 checks passed
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.

2 participants