Repository navigation
fix(rivetkit-core): keep cbor action args as raw CBOR - #6022
Open
poojagosika wants to merge 1 commit into
Open
poojagosika wants to merge 1 commit into
poojagosika wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Fixes #6021
With
encoding: "cbor", rivetkit-core decoded action request args intoserde_json::Value, which cannot hold a CBOR tag or byte string. An argument the client encodes as a tag (Uint8Array,Date,Map,Set) made the request fail withinternal_error(HTTP) orinvalid_request(WebSocket).The cbor paths now decode args as
ciborium::Valueand re-encode them unchanged, so the actor receives exactly what the client sent:ActorConnectActionRequestJson.args(only used by the cbor WebSocket path)HttpActionRequestCborfor the cbor HTTP action path, with the same array / null / single-value handling asnormalize_json_argsThe json and bare paths are unchanged.
Tested with unit tests against
decode_http_action_argsanddecode_actor_connect_message(a tag-64 byte string in args): both fail before this change and pass after; plain cbor args decode the same as before