- 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
57 lines
2.2 KiB
Rust
57 lines
2.2 KiB
Rust
//! PDF parsing primitives.
|
|
//!
|
|
//! This module provides the lexer and object parser for reading PDF documents.
|
|
|
|
pub mod catalog;
|
|
pub mod diagnostic;
|
|
pub mod hint_stream;
|
|
pub mod inline_image;
|
|
pub mod lexer;
|
|
pub mod marked_content;
|
|
pub mod marked_content_operators;
|
|
pub mod marked_content_stack;
|
|
pub mod object;
|
|
pub mod objstm;
|
|
pub mod ocg;
|
|
pub mod outline;
|
|
pub mod pages;
|
|
pub mod resources;
|
|
pub mod secrets;
|
|
pub mod stream;
|
|
pub mod struct_tree;
|
|
pub mod xref;
|
|
|
|
// Re-export from the unified diagnostics module (Phase 1.6)
|
|
pub use crate::diagnostics::{DiagCode, Diagnostic, ObjRef, Severity};
|
|
pub use catalog::{
|
|
parse_catalog, Catalog, MarkInfo, PageLabel, PageLabelStyle, PageLabelsTree,
|
|
ReadingOrderAlgorithm,
|
|
};
|
|
pub use hint_stream::{
|
|
parse_hint_stream, parse_hint_stream_from_linearized, prefetch_from_hint_stream, HintTable,
|
|
};
|
|
pub use inline_image::{parse_inline_image_header, scan_inline_image_data, InlineImageHeader};
|
|
pub use marked_content::{
|
|
compute_coverage, compute_coverage_from_sets, CoverageResult, McidTracker,
|
|
};
|
|
pub use marked_content_operators::{parse_bdc, parse_bmc, parse_emc};
|
|
pub use marked_content_stack::{MarkedContentFrame, MarkedContentStack};
|
|
pub use object::PdfObject;
|
|
pub use objstm::{ObjStmCacheEntry, ObjStmError, ObjStmResult, ObjectStmParser};
|
|
pub use ocg::{parse_oc_properties, BaseState, OcGroup, OcProperties, Ocmd, OcmdPolicy};
|
|
pub use pages::{flatten_page_tree, PageDict, DEFAULT_MEDIABOX};
|
|
pub use resources::{extract_resources, merge_resources, ResourceDict};
|
|
pub use stream::{
|
|
get_decoder, normalize_filter_name, ASCII85Decoder, ASCIIHexDecoder, CryptDecoder, FilterError,
|
|
FlateDecoder, PassthroughDecoder, StreamDecoder, DEFAULT_MAX_DECOMPRESS_BYTES,
|
|
};
|
|
pub use struct_tree::{
|
|
check_coverage_for_pages, is_artifact, map_element_to_block, parse_struct_tree,
|
|
structure_type_to_block_kind, BlockKind, CoverageCheckResult, Kid, MappingResult,
|
|
ParentTreeEntry, ParentTreeResolver, RoleMap, StructElemNode, StructTreeRoot, StructureType,
|
|
};
|
|
pub use xref::{
|
|
detect_linearization, is_hybrid_trailer, load_xref_linearized, load_xref_with_prev_chain,
|
|
merge_hybrid, parse_traditional_xref, parse_xref_stream, LinearizationInfo, ResolveError,
|
|
ResolveResult, XrefEntry, XrefResolver, XrefSection,
|
|
};
|