-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Space API endpoints include extra $ in paths when variable substitution occurs #47
Comments
…rs for the SPACE_ID or BROADCAST_ID there is a $ prepended to the identifier which makes the path incorrect. As a result the API rejects the request. For example, the create a space broadcast endpoint instead of making a request to https://api.mux.com/video/v1/spaces/my_space_id/broadcasts it makes a request to https://api.mux.com/video/v1/spaces/$my_space_id/broadcasts Fixes muxinc#47
Well, this is wild. Thanks for reporting it, and in such a detailed manner. We'll look into it ASAP. |
Fix located. Will be deploying today. |
And fix is out with mux-ruby 3.5.2. Thanks for bringing this to our attention with such a detailed bug report, it really helped. |
@murraysum thanks for the great bug report! 🎉 As part of our OSS contribution program, we'd love to send you some swag as our way of saying thank you and recognizing your work. Please email me at [email protected] with your details and we'll get something sent out to you! 🎁 |
@eropple No problem at all. Thanks for fixing this so quickly, much appreciated. Loving the Mux real time API so far, it is awesome. 👏 @clearlyTHUYDOAN Thank you very much, that is very kind of you. I'll email you my details. 👍 |
Issue
In several of the Space API endpoints when variable substitution occurs for the SPACE_ID or BROADCAST_ID there is a
$
prepended to the identifier which makes the path incorrect. As a result the API rejects the request. For example, the create a space broadcast endpoint instead of making a request tohttps://api.mux.com/video/v1/spaces/my_space_id/broadcasts
it makes a request tohttps://api.mux.com/video/v1/spaces/$my_space_id/broadcasts
:The following endpoints are effected:
mux-ruby/lib/mux_ruby/api/spaces_api.rb
Line 117 in 10dd62c
mux-ruby/lib/mux_ruby/api/spaces_api.rb
Line 182 in 10dd62c
mux-ruby/lib/mux_ruby/api/spaces_api.rb
Line 249 in 10dd62c
mux-ruby/lib/mux_ruby/api/spaces_api.rb
Line 310 in 10dd62c
mux-ruby/lib/mux_ruby/api/spaces_api.rb
Line 379 in 10dd62c
mux-ruby/lib/mux_ruby/api/spaces_api.rb
Line 511 in 10dd62c
mux-ruby/lib/mux_ruby/api/spaces_api.rb
Line 580 in 10dd62c
How to reproduce
The default spaces example for creating a broadcast should show you the error:
You should get API response something like this (redacted the space_id):
Expected behaviour
When variable substitution occurs in the API paths
$
is not prepended to identifiers and API requests are not rejected.Actual behaviour
When variable substitution occurs in the API paths
$
is prepended to identifiers and API requests are rejected.The text was updated successfully, but these errors were encountered: