FreeOpcUa / opcua-asyncio

OPC UA library for python >= 3.7
GNU Lesser General Public License v3.0
1.04k stars 346 forks source link

Fix NodeId parsing for nodes containing semicolons in string identifiers #1587

Closed Galaxy102 closed 4 months ago

Galaxy102 commented 4 months ago

NodeId calculation from string failed when the Identifier portion contained semicolons.

According to the OPC-UA spec (https://reference.opcfoundation.org/Core/Part3/v104/docs/8.2.4 and https://reference.opcfoundation.org/Core/Part3/v105/docs/8.2.4) there are no limitations to string node identifiers within the unicode charset - they should only not contain unicode control characters. I've already seen some OPC-UA servers where this occurs (see example below).

Example: The node ns=9;s=Line1.nsuri=MACHINE.NS;s=MACHINE.NS.State.Running is regularly deconstructed as NamespaceId 9, Identifier Type String, Identifier Line1.nsuri=MACHINE.NS;s=MACHINE.NS.State.Running. Previously this was parsed to have the Identifier MACHINE.NS.State.Running, now it is as expected.