-
-
Notifications
You must be signed in to change notification settings - Fork 232
Open
Description
Describe the bug
Attempting to save zstd-encoded content in wayback results in corrupted data being served during replay.
Steps to reproduce the bug
- Run
wayback --live
. - Open Firefox.
- Type "http://localhost:8080/" in the address bar.
- Press enter.
- In the page that opens, click on the "/live" link.
- In the URL input, enter "https://goughlui.com/" (I'm not the owner of the blog, it just seems to be one of the few web sites that use zstd).
- Click on the "Search" button.
- Open the first capture that appears in the calendar view.
Expected behavior
A page identical to the one available through a browser should be served.
Screenshots
Environment
- OS: Debian 12
- Browser: Firefox
- Version: 141.0
Additional context
In order to make sure that the issue was caused by the zstd encoding, I tried removing the zstd entry from Firefox's network.http.accept-encoding.secure setting, and this did indeed make wayback work as expected. One important thing to keep in mind is that the issue can not be reproduced when wayback is not bound to localhost. This is because Firefox will only accept zstd in a "secure" context, and since the HTTP server provided by Werkzeug does not use HTTPS, Firefox will not treat it as a "secure" context unless it is bound to localhost.
ozziek
Metadata
Metadata
Assignees
Labels
No labels