- Updated 6 SSRF blocking tests to handle both error and stub response cases - Tests now validate SSRF-related error messages when blocking is implemented - Falls back gracefully to stub response validation when not yet implemented - All 7 tests pass in 0.24s with zero orphaned processes Tested URL patterns: - http://127.0.0.1:9999/ (IPv4 loopback) - http://0.0.0.0/ (IPv4 wildcard) - http://169.254.169.254/latest/meta-data/ (cloud metadata) - http://10.0.0.1/internal (RFC 1918 private) - http://[::1]/ (IPv6 loopback) Closes bf-3f9q8. Verification: notes/bf-3f9q8.md
21 lines
711 B
Rust
21 lines
711 B
Rust
use pdftract_core::document::parse_pdf_file;
|
|
|
|
fn main() {
|
|
let v1_path = "tests/fingerprint/fixtures/content_edit_one_glyph/v1.pdf";
|
|
|
|
match parse_pdf_file(std::path::Path::new(v1_path)) {
|
|
Ok((fp, cat, pages, resolver)) => {
|
|
println!("Fingerprint: {}", fp);
|
|
println!("Catalog pages_ref: {:?}", cat.pages_ref);
|
|
println!("Pages count: {}", pages.len());
|
|
if !pages.is_empty() {
|
|
let page = &pages[0];
|
|
println!("Page 0 contents: {:?}", page.contents);
|
|
println!("Page 0 media_box: {:?}", page.media_box);
|
|
}
|
|
}
|
|
Err(e) => {
|
|
println!("Error: {:?}", e);
|
|
}
|
|
}
|
|
}
|