Commit Graph

2 Commits

Author SHA1 Message Date
Sean DuBois
77c6e3b827 Properly sanitize STUN urls
Currently we error if a STUN URL passed to Configuration.ICEServers
contained a query parameter. Fix this by using the getICEServers
function that sanitizes these for us.
2019-12-11 00:18:39 -08:00
mchlrhw
7243561f2f Implement permissive STUN URL parsing
The parser included in the ice package strictly adheres to RFC 7064,
however, this can be problematic when attempting to use ICE server URLs
that were automatically generated by a third party.

Twilio, for example, has been seen to send the following in its list of
ICE servers:

    stun:global.stun.twilio.com:3478?transport=udp

which would require user intervention to sanitise before passing to
Pion.
This patch side-steps this aspect of ice.ParseURL by pre-stripping any
queries that may be present so that we can allow URLs of this form.
2019-07-17 06:42:46 +01:00