Skip to content

v0.12.3 — parser correctness patch (full code review)

Choose a tag to compare

@fastrevmd-lab fastrevmd-lab released this 02 Jul 14:46

Parser correctness patch from a full code review — closes #33 (via PR #34). No API changes.

crates.io: rustnetconf 0.12.3 · rustnetconf-cli 0.3.3 · rustnetconf-yang unchanged at 0.1.4

Changes

Five XML parser fixes, all pre-existing defects surfaced by review, each covered by new regression tests:

  • Namespace prefixes preserved when reconstructing <data>/error-info/Junos inner XML — <if:interfaces xmlns:if="…"> no longer collapses to <interfaces>, which detached elements from their namespace.
  • CDATA sections captured in every parser (reply data, error fields, capabilities, eventTime, session-id, CLI diff) instead of being silently dropped.
  • Attribute values fully re-escaped on reconstruction — single-quoted source attributes containing " previously produced malformed output.
  • Text-format Junos config is XML-escaped in load_configuration — set commands containing &/</> previously generated malformed RPCs.
  • Top-level empty elements under <rpc-reply> (e.g. <software-information/>) now parse as data instead of a bare <ok/>.

Dependency hygiene

  • anyhow 1.0.102 → 1.0.103 — clears RUSTSEC-2026-0190 (Error::downcast_mut() unsoundness)
  • crypto-bigint 0.7.4 → 0.7.5 — replaces the yanked version

cargo audit is now fully clean: no vulnerabilities, no warnings.