Verify configuration dependency registry resolutions before installing plugins, with independently checked pinned tarballs. Require config dependencies to resolve from a registry and skip registry verification when the installed config dependencies already match the lockfile. Constrain archive and deployment paths and preserve content-addressed files when streaming package entries. Bound metadata allocation before the archive parser buffers it, using an opt-in patch to the upstream tar crate. Bound publishing manifest and README buffers without imposing a total extraction disk quota. Bind audit signatures to lockfile integrity, hash ambiguous URL dependency directory names, and sanitize license terminal output. Preserve dependency error context and structured fatal logs. Update affected documentation, release notes, and regression coverage.
14 lines
285 B
Rust
14 lines
285 B
Rust
extern crate tar;
|
|
|
|
use std::fs::File;
|
|
use tar::Builder;
|
|
|
|
fn main() {
|
|
let file = File::create("foo.tar").unwrap();
|
|
let mut a = Builder::new(file);
|
|
|
|
a.append_path("README.md").unwrap();
|
|
a.append_file("lib.rs", &mut File::open("src/lib.rs").unwrap())
|
|
.unwrap();
|
|
}
|