Caching messes up content filtering
Maintainers usually reply within 1 day
@jupenur is already working on this.
Since May 19, 2026.
Assessment
This issue has not been assessed yet.
Description
Firefox can cache resources in a way that makes their content invisible to filterResponseData. There is an attempt to address that problem here, but it's not working as intended: https://github.com/freedomofpress/webcat/blob/88fca91fd3cb3e417e8c68a142c665b6f343b60b/extension/src/webcat/response.ts#L270-L277
Some of the buggy behavior can be reproduced on https://integrity-error.demo.webcat.tech/corrupted-image/:
- Loading the URL normally will often* result in no integrity error. The image will be silently blocked from loading.
- Shift-reloading the page seems to always result in an integrity error -- as it should, since it bypasses caches.
- Directly typing https://integrity-error.demo.webcat.tech/corrupted-image/image.png to the URL bar similarly will mostly* result in no integrity error, but the image will not be displayed.
- Shift-reloading the image URL has a similar effect to shift-reloading the page.
- Disabling the extension and shift-reloading the page (or the image) allows the bad image to poison the cache. If you then re-enable WEBCAT and reload the page, the bad image will be rendered in-page.
- Most importantly, loading the image URL directly also renders the image, bypassing validation. If the image were an SVG, it could most likely execute scripts, but this has not been tested.
* The behavior is not consistent, it might take a few tries to repro.
It also seems like the code will not work correctly in the happy-path case of a valid image whose hash is in the manifest: because of caching, the filter may see a zero-length response and write a zero-length response, despite the cache contents being valid.
- Dominant language
- TypeScript
- Stars
- 116
- Forks
- 12
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 10
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from freedomofpress/webcat
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
freedomofpress/webcat#260 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
freedomofpress/webcat#332 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 56/100
freedomofpress/webcat#330 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 8/100
freedomofpress/webcat#323 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
freedomofpress/webcat#302 ·
Maintainers usually reply within 1 day
All issues in freedomofpress/webcat
Similar issues
-
Translate the appOpengood first issue help wanted
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Mikiyas-Meles-Assefa/opensourcebook#154 · 1 comment ·
Maintainers usually reply within 1 day
-
rowbinary: typeStringToReader keeps Variant members in text order, so Variant(Int64, Float64) reads 7 as 3.5e-323Possibly taken @rwits08 claimed this today. Openbug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/clickhouse-js#1293 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sidebandstudio/clawtrate#1863 ·
Maintainers usually reply within 1 day
-
agent/quality testing
Difficulty 1/5 Under an hour Newbie friendliness 95/100
cncf/techdocs#463 · 1 comment ·
Maintainers usually reply within 1 day
-
GitHub registry install via `gh` credentials rewrites `\u0000`–`\u001f` escapes in source files to `^@`–`^_`Possibly taken @carlosrobert0 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 2 days