brepjs-bim 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,9 +24,15 @@ export interface XmlNode {
24
24
  readonly text: string;
25
25
  }
26
26
  /**
27
- * Parse an XML string into a tree. Tolerant of the XML declaration, comments,
28
- * whitespace, self-closing tags, and CDATA-free text. Throws on malformed
29
- * structure (unbalanced tags); callers wrap this in a `Result`.
27
+ * Parse an XML string into a tree. Tolerant of the XML declaration, processing
28
+ * instructions, comments, whitespace, self-closing tags, and CDATA-free text.
29
+ * Throws on malformed or unbalanced structure; callers wrap this in a `Result`.
30
+ *
31
+ * This is a hand-written cursor scan rather than a single tokenizing regex: the
32
+ * input is an untrusted `.bcfzip` payload, and a backtracking regex over
33
+ * uncontrolled data is a polynomial-ReDoS vector. Every construct here is
34
+ * consumed by an `indexOf` or a single-character advance, so the parse is linear
35
+ * in the input length. The sibling `ids/idsXml.ts` parser scans the same way.
30
36
  */
31
37
  export declare function parseXml(xml: string): XmlNode;
32
38
  export declare function findChild(node: XmlNode, tag: string): XmlNode | undefined;