Skip to content

Conversation

simonw
Copy link
Contributor

@simonw simonw commented Feb 12, 2025

Used this prompt with Claude:

Add support for zip files. When the file has been fetched into the tmp directory check to see if it is a
zip file rather than a SQLite DB. If it is a zip file, check the size of the largest file inside of it -
that is the file we are going to extract. Check that the file is not more than 5x the size of the zip file
itself to avoid compression bombs. Then extract that file out to the temp directory and continue with the
step that validates it is valid SQLite. If these checks fail delete the downloaded file and return an
error.

Add support for zip files. When the file has been fetched into the tmp directory check to see if it is a
  zip file rather than a SQLite DB. If it is a zip file, check the size of the largest file inside of it -
  that is the file we are going to extract. Check that the file is not more than 5x the size of the zip file
  itself to avoid compression bombs. Then extract that file out to the temp directory and continue with the
  step that validates it is valid SQLite. If these checks fail delete the downloaded file and return an
  error.
@simonw simonw linked an issue Feb 12, 2025 that may be closed by this pull request
@simonw simonw merged commit fe3c584 into main Feb 12, 2025
10 checks passed
@simonw simonw deleted the zip branch February 12, 2025 18:57
@simonw
Copy link
Contributor Author

simonw commented Jul 7, 2025

I added this feature for GitHub Actions artifacts, then noticed those require an authorization header... so I added this feature too:

simonw added a commit that referenced this pull request Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle (carefully) URLs to zip files
1 participant