Merged
Conversation
Two bugs fixed: 1. Sudoed admins didn't receive real-time updates (CreateMarket, SettleMarket, EditMarket) for visibility-restricted markets because these were routed via send_private only to visible_to accounts. 2. Non-admin users received broadcast updates (OrderCreated, OrdersCancelled, Redeemed) for markets they shouldn't see because send_public had no visibility filtering. Fix: always broadcast via send_public and filter on the receive side - messages about markets the user can't see are dropped before sending to the client. Admin+sudo bypasses this filter.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Market,MarketSettled) for visibility-restricted markets. These were routed viasend_privateonly tovisible_toaccounts, so admins with sudo who weren't in the list missed them entirely.OrderCreated,OrdersCancelled,Redeemed) for markets they shouldn't see, becausesend_publichad no visibility filtering on the receive side.send_publicand add ashould_filter_for_visibilitycheck on the receive path that drops messages about markets the client can't see. Admin+sudo bypasses this filter.Test plan
websocket_visibility.rscovering:cargo test-all)cargo clippyclean