Files
Dylan M. Taylor 91278b06c5 fix: escape untrusted values written to text logs (#315)
## What was wrong
Untrusted strings (stored-media task ids, character names/descriptions,
URLs, alert summaries, analytics tokens, referral URLs, webhook bodies
and request ids, bucket object names, ffmpeg stderr that echoes
uploaded-file metadata) were written into the line-oriented text log
with `{}`. The logger writes them verbatim, so embedded `\n`/`\r` can
forge extra log records (CWE-117).

## What changed
Those log calls now use `{:?}` (escaped Debug formatting), the same fix
suggested by each finding. In `ffmpeg_trim_and_resample` the raw
`stdout`/`stderr` passthrough on failure is replaced by one escaped
`error!` of the last 4096 chars of stderr.

## Behavior changes
Log text only: the affected values now appear quoted with control
characters escaped. No functional change.

## Not addressed (needs owner)
The two DoS findings on the same ffmpeg function (resampling a sparse
long timeline before a duration check) and the X-Forwarded-For
access-log format are left open.

## Checks
- run: `cargo check` of all touched crates and `storyteller-web --tests`
- not run: tests (no behavior change); clippy -D warnings (fails on
unmodified main in `enums`)

Findings: 3e12b40f c10eca2b 5b5d3ef0 a854bbdb 1bc24295 688c3caa 7d8c80ec
420d5274 f1ef31ed 6c85d749 a09f0426 337212ea c9ed7098 18c19719 6c507d8b


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Failure details from media processing are now recorded in application
logs without forwarding captured process output to the console.
* **Chores**
* Diagnostic messages across uploads, requests, alerts, analytics,
referrals, and webhooks now display values consistently, making unusual
characters and surrounding whitespace easier to distinguish. Request
handling, validation, and upload behavior remain unchanged.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-11 11:16:49 -05:00
..
wip
2026-09-14 15:40:33 -04:00