Closed olofhagsand closed 2 years ago
If an XML string is encoded with CDATA, the YANG length checks are not correct. Example, CDATA encoding of string "abc":
<rpc> <edit-config> <target><candidate/></target> <config> <len1 xmlns="urn:example:clixon"><![CDATA[abc]]></len1> </config> </edit-config> </rpc>
The YANG string validate check computes the length of the string to 15 (eg strlen("<![CDATA[abc]]>") and not the correct length 3. This may to invalid validate of string lengths.
After analysis, the issue is not valid as stated. CDATA as entered above should be treated as payload and therefore be included in the length
If an XML string is encoded with CDATA, the YANG length checks are not correct. Example, CDATA encoding of string "abc":
The YANG string validate check computes the length of the string to 15 (eg strlen("<![CDATA[abc]]>") and not the correct length 3. This may to invalid validate of string lengths.