Files
reverse-engineering-anything/src/nuget
Adolanium 06761f2993 fix(xml): bound element depth at the XML syntax boundary (#14998)
* fix(xml): refuse element depth at the syntax check

saxes keeps one handler per event and walks the open-element stack on
every start tag. checkXmlSyntax now owns opentagstart and closetag, runs
every caller handler after the depth check, and refuses depth above 1024
as xml-element-depth. 1024 stays above the desktop XML view cap and the
plist nesting cap. This release adds no runtime override.

* fix(xml): keep the depth limit when package parsers read XML

XAR TOC, installer XML, Maven POM, and VSIX manifest parsing wrapped
every syntax failure as malformed or a node budget. A depth limit is
returned as the limit failure those callers already accept.

* test(xml): cover element depth past the syntax ceiling

A document one element past 1024 fails the syntax check, including a
XAR TOC that used to parse because a later opentagstart handler replaced
the depth guard. A sibling range after a branch at the ceiling still
matches.

* test(plist): keep nesting refusals inside the XML depth ceiling

Plist fixtures deeper than 1024 now fail at syntax, so the nesting-limit
cases sit on the deepest document the syntax check admits. One plist and
one keyed archive assert the syntax limit past that ceiling.

* fix(xml): type the depth guard as a saxes start tag

opentagstart emits a start tag, not the finished SaxesTagNS. The handler call failed typecheck on that assignment.

* fix(xml): report element depth from the package providers

A VSIX manifest or Maven POM past the syntax ceiling is an XML limit. Those providers only translated their own format, so the refusal became an I/O error.

* fix(xml): report element depth as a fixed allowance

* fix(firmware): report SVD element depth as the XML ceiling

* fix(nuget): preserve XML element depth on package XML

* fix(capture): preserve XML element depth in SAZ metadata

* style(nuget): format the package fixture

* fix(plist): report XML element depth from native inspection

* fix(pkg): carry the XML depth allowance through a deep TOC

* test(plist): narrow the XML depth refusal before projection

The native depth failure is an analysis error. Project it after that check.
2026-11-29 13:08:39 -05:00
..