|
1 | 1 | # Bug scan progress |
2 | 2 |
|
3 | | -Last scanned: app.py — 2026-07-15 |
| 3 | +Last scanned: lrtmp2_client.py — 2026-08-11 |
4 | 4 |
|
5 | 5 | ## Module checklist |
6 | 6 |
|
7 | 7 | - [x] `app.py` — Flask routes, auth, session handling, stream CRUD |
8 | | -- [ ] `lrtmp2_client.py` — librtmp2-server REST API client |
| 8 | +- [x] `lrtmp2_client.py` — librtmp2-server REST API client |
9 | 9 | - [ ] `config.py` — startup validation and environment configuration |
10 | 10 | - [ ] `templates/` — Jinja2 templates (XSS, CSRF forms) |
11 | 11 | - [ ] `static/js/` — frontend JavaScript (DOM injection, fetch logic) |
12 | 12 |
|
13 | 13 | (`templates/`/`static/js/` were actually scanned 2026-07-05/06, see findings |
14 | 14 | below — checkboxes just hadn't been ticked.) |
15 | 15 |
|
| 16 | +## Findings (2026-08-11 lrtmp2_client.py pass) |
| 17 | + |
| 18 | +- No critical bugs found. Re-reviewed all client methods (`health`, |
| 19 | + `list_streams`, `create_stream`, `delete_stream`, `create_player`, |
| 20 | + `delete_player`, `stream_stats`, `stream_stats_by_id`, cluster |
| 21 | + drain/resume/remove/status/nodes/streams) and every `app.py` call site |
| 22 | + (all catch `Lrtmp2ApiError`; stream/player IDs validated before API calls; |
| 23 | + cluster node IDs parsed as integers in `_cluster_node_action`). |
| 24 | +- `delete_stream()` 202 polling (35s default), `_request`/`_request_json` |
| 25 | + network+JSON error wrapping, URL-encoding of path segments, Bearer-only auth, |
| 26 | + and `cluster_remove_node` not treating bare 404 as success remain correct. |
| 27 | +- Reviewed but not a bug: `wait_timeout=35` is shorter than librtmp2-server's |
| 28 | + current 300s RTMP drain cap — deletes of long-lived live sessions can surface |
| 29 | + a spurious "still present" error while the server is still draining in the |
| 30 | + background (stream is disabled server-side). This is a false failure (safer |
| 31 | + than false success) and cannot be extended to 300s without raising Gunicorn |
| 32 | + `--timeout` (currently 60s). Stale docstring still says "30s" server drain; |
| 33 | + not changed in this pass. |
| 34 | +- Reviewed but not a bug: `stream_stats()` is unused by `app.py` (panel uses |
| 35 | + authenticated `stream_stats_by_id`); `health()` sends Bearer token though |
| 36 | + the endpoint is public; no shared mutable client state across workers. |
| 37 | + |
16 | 38 | ## Findings (2026-07-15 app.py pass) |
17 | 39 |
|
18 | 40 | - **Bug (fixed):** `delete_stream()` moved deletes into a daemon background |
|
0 commit comments