Skip to content

Fix a problem with a colon in a TURN username

Neil Young requested to merge foreverneilyoung/gst-plugins-bad:patch-1 into master

This patch fixes an issue with valid TURN credentials following the COTORN rules of creating a "usercombo" for OTPs:

(from /etc/turnserver.conf)

# This option is used with timestamp:
# 
# usercombo -> "timestamp:userid"
# turn user -> usercombo
# turn password -> base64(hmac(secret key, usercombo))

The current solution does not parse the username correctly, if it contains a ":", since the code is treating the first appearance as delimiter between username and password. Hence all authentication attempts at COTURN will fail, since Gst is using the wrong username.

The fix - initially provided by @selamipak and published here #831 (closed) - has been validated to work and is applied as PR by me now.

Feel free to use it.

Edited by Matthew Waters

Merge request reports