docs.rs icon indicating copy to clipboard operation
docs.rs copied to clipboard

Filtering uploaded files

Open Zexbe opened this issue 5 years ago • 3 comments

When dealing with crates, the site should check that they are a sane size, and file type before uploading them. Ex: 100gb video should be blocked.

Zexbe avatar Feb 03 '20 23:02 Zexbe

Relevant code: https://github.com/rust-lang/docs.rs/blob/master/src/db/file.rs#L190

jyn514 avatar Feb 03 '20 23:02 jyn514

What seems like a reasonable file size limit @jyn514?

Kixiron avatar May 30 '20 20:05 Kixiron

From what I understand, a 100 GB video file could only end up in docs.rs, if it was previously uploaded to crates.io too, which I assume has reasonable limits.

I could imagine that macro generated docs could reach sizes that are bigger (megabytes?), so some limit is perhaps helpful to releave the server.

syphar avatar Aug 02 '23 19:08 syphar