pion / ice

A Go implementation of ICE
https://pion.ly/
MIT License
424 stars 158 forks source link

Escape spaces in IPv6 ZoneID with %20 #703

Closed sirzooro closed 2 months ago

sirzooro commented 2 months ago

Link-local IPv6 addresses may have ZoneID attached at the end. ZoneId is name of corresponding network interface. On Windows usually it is "Local connection". Space in ZoneID causes problem when ICE candidate is parsed so it has to be escaped. It looks that there is no escaping defined specifically for SDP; the closest one is RFC 6874 for URI. This fix partially uses this approach and replaces spaces with %20.

Description

Reference issue

Fixes #...

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.20%. Comparing base (2a9fdb5) to head (92356b3).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #703 +/- ## ========================================== + Coverage 79.19% 79.20% +0.01% ========================================== Files 41 41 Lines 3739 3741 +2 ========================================== + Hits 2961 2963 +2 Misses 547 547 Partials 231 231 ``` | [Flag](https://app.codecov.io/gh/pion/ice/pull/703/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | Coverage Δ | | |---|---|---| | [go](https://app.codecov.io/gh/pion/ice/pull/703/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `79.20% <100.00%> (+0.01%)` | :arrow_up: | | [wasm](https://app.codecov.io/gh/pion/ice/pull/703/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `22.17% <100.00%> (+0.04%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sirzooro commented 2 months ago

I have read more about this ZoneID and found that it has only local meaning and should not be sent out over the wire. So this PR is invalid, and different fix is needed here. I will create it.