Forbid tarballs with hard links being uploaded
Forbid tarballs with hard links being uploaded

It was discovered recently that tarballs with hard links aren't properly handled
in the `tar` crate and can in malicious situations cause any file on the
filesystem to get overwritten during the extraction process. This commit is a
patch for crates.io to simply reject all tarballs which have hard links inside
of them. This is a big hammer of a solution and is step 1 of a fix for this bug.

I've verified that all existing tarballs on crates.io do not contain hard links
and Cargo itself doesn't produce tarballs with hard links inside them. That
means that no legitimate tarball should be rejected as a result of this patch.
After this has been deployed I'll be updating the `tar` crate as well as Cargo
itself, in addition to posting an announcement.

rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io