Prevent percent-encoding on InstanceID#584
Draft
Powerbyte7 wants to merge 1 commit into
Draft
Conversation
09cffd3 to
dc48615
Compare
dc48615 to
1277727
Compare
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.
This PR fixes an issue with url encoding of InstanceID in URLs.
The VRChat API does not accept percent-encoded variants of InstanceID, specifically the characters
~(). This causes an error when attempting the following API call:{"error":{"message":"\"malformed url\"","status_code":400,"waf_code":26497}}When using the raw string without encoding, the API yields a
200response as expected.The workaround I found for this, is to set the schema type to
passwordinstead ofstring. This skips theurlencodecall inside of the SDK. The Rust template only does URL encoding for the string type, as is shown here. A bit ugly, but it works.More testing is needed before merging this fix, as I have only tested generation of the Rust SDK.