You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sets allow choices to be annotated with the sinceVersion attribute, but this is not taken into account when decoding messages.
We encountered this problem when a new choice was added to a set in newer version of a protocol, correctly annotated with sinceVersion. The messages we sent had neglected to call clear() on the set before setting the fields, so the remainder of the bytes containing the bitset had arbitrary data in (we have since fixed this), and the consumer was reading the new choice which was occasionally accidentally set.
I would argue the decoder should not attempt to read a choice that's annotated sinceVersion where the sinceVersion is higher than the wire message's version, returning a default false instead.
Alternatively, if sinceVersion shouldn't be factored into generated decoders, it should not be allowed as an annotation on choices, as it gives a false sense of security.
The text was updated successfully, but these errors were encountered:
Sets allow choices to be annotated with the sinceVersion attribute, but this is not taken into account when decoding messages.
We encountered this problem when a new choice was added to a set in newer version of a protocol, correctly annotated with sinceVersion. The messages we sent had neglected to call clear() on the set before setting the fields, so the remainder of the bytes containing the bitset had arbitrary data in (we have since fixed this), and the consumer was reading the new choice which was occasionally accidentally set.
I would argue the decoder should not attempt to read a choice that's annotated sinceVersion where the sinceVersion is higher than the wire message's version, returning a default false instead.
Alternatively, if sinceVersion shouldn't be factored into generated decoders, it should not be allowed as an annotation on choices, as it gives a false sense of security.
The text was updated successfully, but these errors were encountered: