Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

Galaxy102
Copy link
Contributor

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.

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`
…lons

These tests should have asserted that the semicolon was actually part of the resulting NodeId as per OPC-UA spec, because string identifiers may contain arbitrary characters except Unicode control characters (e.g. semicolons).
@oroulet oroulet merged commit 85b56c7 into FreeOpcUa:master Feb 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants