Skip to content

systemd user unit interpolates the install path without rejecting control characters #41

Description

@ascendedent

Summary

scripts/install-systemd-user writes user units with:

WorkingDirectory=$UNIT_ROOT
ExecStart="$PYTHON_BIN" "$ROOT/meter.py"

UNIT_ROOT only substitutes spaces (${ROOT// /\x20}). Newlines, quotes, or backslashes in the clone path can break out of the unit file.

This is user-controlled (you pick the clone directory), not remote injection. Still worth rejecting control characters and quotes in ROOT before interpolating, or generating the unit with a language that escapes systemd strings.

atomic_write_text() in token_meter/app.py also leaves new files at the process umask instead of 0600. The Git-delivery SQLite salt lives under ~/.token-meter/.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions