LocalizedText write: authorize invariant locale and same locale on existing instance
Description
Write operation on a LocalizedText fails in server in several cases when an existing unique locale is already defined as default:
- if the write operation uses the invariant locale
- if the write operation uses the same locale as the existent one but is not in supported locale list
In both cases it seems acceptable to accept the write operation:
- Writing the invariant locale is indicated as valid by the specification which does not restrict it explicitly when a locale is already present.
- If the default locale was already unsupported on initialization, it should be acceptable to re-use it.
Code version identification
Security impact
N.A.
Implementation
Write operation on a LocalizedText is implemented by SOPC_LocalizedText_AddOrSetLocale (and SOPC_LocalizedText_AddOrSetLocale_Internal_SetSupported).
Add exceptional cases to manage overwrite of the current "default locale" with the invariant (empty) locale or the same locale, if the invariant local is set add the non-invariant one in the list of locales.
Edited by Vincent Monfort