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
ICS27 handshakes should respect the entrypoint from which they were initiated.
With the introduction of the controller msg server the MiddlewareEnabled flag has been added to the legacy APIs and used for cb routing when enabled. This flag is only stored in state for account registration initiated via the legacy API.
Create MiddlewareEnabled flags such that there is something in state in the key regardless of whether it is enabled or disabled. We then check on the APIs, to make sure if there is a handshake in-flight, that the value is the same. If the values are not the same, we return an error.
Note we must also check the status of the active channel. If the active channel is closed then we must allow reopening via either API.
damiannolan
changed the title
Avoid potential race condition in ics27 handshakes via msg server and go apis
Avoid race condition in ics27 handshakes via msg server and go apis
Nov 4, 2022
Summary
ICS27 handshakes should respect the entrypoint from which they were initiated.
With the introduction of the controller msg server the
MiddlewareEnabled
flag has been added to the legacy APIs and used for cb routing when enabled. This flag is only stored in state for account registration initiated via the legacy API.Create MiddlewareEnabled flags such that there is something in state in the key regardless of whether it is enabled or disabled. We then check on the APIs, to make sure if there is a handshake in-flight, that the value is the same. If the values are not the same, we return an error.
Note we must also check the status of the active channel. If the active channel is closed then we must allow reopening via either API.
For Go APIs the pseudocode is:
For Msg Server the pseudocode is:
For Admin Use
The text was updated successfully, but these errors were encountered: