Spaces:
Paused
Paused
Commit History
-
fix(logging): strip API keys from upstream error URLs before logging
PNRxAreqwest embeds the full request URL — query string included — in both the Display and Debug of its errors. TMDB, OMDb, MDBList and fanart all pass their API key as a query parameter (`?api_key=…` / `?apikey=…`), so an upstream 404/timeout/decode error logged via `AppError::Api` leaked the key into the logs, e.g.: mdblist rating fetch failed: API error: HTTP status client error (404 Not Found) for url (https://api.mdblist.com/imdb/show/tt…?apikey=<KEY>) Sanitize the error object itself at the only two `AppError::Api` construction sites — the `From<reqwest::Error>` conversion (every `?`/`error_for_status()?`) and the direct build in `services::retry` — by dropping the URL's query string (`set_query(None)`). Scrubbing the stored error rather than one Display site also protects Debug output and the moka `Arc<AppError>` → `Other(_.to_string())` laundering paths in image::serve. Scheme/host/path are kept for debugging; the key is never in them. Trakt sends its key as a header, whic…937da1f -
fix(image): preserve client error status from cache under concurrent requests
PNRxAImage requests are de-duplicated through moka's `try_get_with`, which returns the init closure's error as `Arc<AppError>`. On concurrent calls for the same key, moka hands every waiter a *clone* of that `Arc`, so `Arc::try_unwrap` fails (strong count > 1) and the `Err` arm collapsed the error to `AppError::Other` — a 500. The visible symptom was a spurious 500 in prod: status=500 Internal Server Error error=id not found: no logo available A single request for a title with no logo correctly returns 404; it only flipped to 500 when several identical requests raced (the inflight herd), which is exactly when the Arc is shared. The poster and episode serve paths had the same bug. Add `AppError::from_cached`, which moves the error out when it is the sole owner and otherwise rebuilds the client-facing variants by reference so the HTTP status is preserved; only genuinely-internal variants collapse to `Other`. Use it at all three image serve sites, and replace the hand-rolled equivalent…62f0fc0
-
change 404 log level
PNRxA7ab1c55
-
CORS lockdown, path traversal prevention, error redaction, password max
PNRxAlength, API key log redaction, timing side-channel fix, HSTS, and poster rate limiting5f0e2ae -
init tests
PNRxAdd7a3f0 -
added auth implementation from uwu-admin, api keys
PNRxAa38005e -
store metadata in sqlite
PNRxA8b1a6cb -
initial scraping api endpoints
PNRxA0fcb5c2