meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.25k stars 2.48k forks source link

[1.1.0] When using TURN REST API client, parameters are not uri encoded. #3112

Closed croudet closed 1 year ago

croudet commented 1 year ago

What version of Janus is this happening on? v1.1.0

Have you tested a more recent version of Janus too? Yes. latest code.

Additional context When using the TURN REST API client, parameters (api_key, user) are not uri encoded.

lminiero commented 1 year ago

Yes I guess that's likely, since we're just crafting the query string manually, and then passing it via CURLOPT_POSTFIELDS (which according to the documentation doesn't encode the data itself). I guess we'll have to use curl_easy_escape on the parameters before writing them to the query string.

lminiero commented 1 year ago

Should be fixed now, thanks for spotting this!