oa_gateway_agra

Constant MAX_WRAPPER_DEPTH

Source
pub(crate) const MAX_WRAPPER_DEPTH: usize = 64;
Expand description

Deepest element nesting a wrapper document is allowed before parsing is refused outright.

A real Rx/Tx wrapper is a handful of levels deep: MessageData holding a few flat fields, one of them (EncodedPayload) an opaque hex string rather than nested XML. This is headroom over that shape, not a measurement of it — wide enough that no real wrapper is ever refused, narrow enough that a peer cannot hide a few thousand levels of nesting inside a field this crate never otherwise inspects.