This repository was archived by the owner on Jun 23, 2026. It is now read-only.
Commit 52a8e41
committed
fix: address gemini-code-assist 5th review on PR #1
Both findings legitimate, both applied:
- collect_rss._fetch caps the response at 10 MiB (MAX_FEED_BYTES) via
r.read(MAX_FEED_BYTES). Without a bound, a hostile or runaway origin
could exhaust the worker's memory. AWS feeds are sub-megabyte; the
cap is just a safety net. [MEDIUM]
- collect_rss._strip_html now unescapes BEFORE stripping tags. The
old order let entity-encoded markup (`<script>...`) bypass
the strip pass and resurface as raw HTML after html.unescape ran on
the regex output. New regression test
`test_summary_strips_entity_encoded_tags` locks in the corrected
order. DOMPurify on the web rendering side is still the last line of
defense, but cleaning at the source is the right layer. [MEDIUM]1 parent 1145de7 commit 52a8e41
2 files changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
0 commit comments