- 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
19 lines
636 B
Rust
19 lines
636 B
Rust
// Quick test to understand serialization format
|
|
use pdftract_core::fingerprint::canonicalize::serialize_dict_canonical;
|
|
use pdftract_core::parser::object::{PdfDict, PdfObject};
|
|
use std::sync::Arc;
|
|
|
|
#[test]
|
|
fn debug_serialization() {
|
|
let mut dict = PdfDict::new();
|
|
dict.insert(Arc::from("/Z"), PdfObject::Integer(3));
|
|
dict.insert(Arc::from("/A"), PdfObject::Integer(1));
|
|
dict.insert(Arc::from("/M"), PdfObject::Integer(2));
|
|
|
|
let bytes = serialize_dict_canonical(&dict);
|
|
println!(
|
|
"serialize_dict_canonical output: {}",
|
|
String::from_utf8_lossy(&bytes)
|
|
);
|
|
println!("bytes: {:?}", bytes);
|
|
}
|