Skip to content

Commit

Permalink
Reject ICE servers with an authority component or /
Browse files Browse the repository at this point in the history
Complete integration of URL parser from #2853
see also #2997 (comment)
This aligns with the constraints set in the respective RFC (and thus with the current WebRTC Rec)
  • Loading branch information
dontcallmedom committed Sep 4, 2024
1 parent e8ac445 commit 2369fad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
8 changes: 7 additions & 1 deletion amendments.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@
},
{
"description": "Use the url spec to parse ice server urls",
"pr": 2853,
"pr": [2853, 2998],
"type": "correction",
"tests": [
"webrtc/RTCConfiguration-iceServers.html"
],
"testUpdates": [
"web-platform-tests/wpt#47959"
],
"status": "candidate",
"id": 33
}
Expand Down
12 changes: 7 additions & 5 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -3058,7 +3058,7 @@ <h4>
<ol>
<li>
<p>Let <var>parsedURL</var> be the result of
<a data-cite="!url#concept-url-parser">parsing</a>
[=basic url parser|parsing=]
<var>url</var>.</p>
</li>
<li>
Expand All @@ -3069,9 +3069,10 @@ <h4>
<li><var>parsedURL</var>'s [=url/scheme=] is neither `"stun"`,
`"stuns"`, `"turn"`, nor `"turns"`</li>
<li><var>parsedURL</var> does not have an [=url/opaque path=]</li>
<li><var>parsedURL</var>'s' [=url/fragment=] is non-null</li>
<li><var>parsedURL</var>'s' [=url/scheme=] is `"stun"` or `"stuns"`,
and <var>parsedURL</var>'s' [=url/query=] is non-null</li>
<li><var>parsedURL</var>'s [=url/opaque path=] contains one or more `"/"` or `"@"`</li>
<li><var>parsedURL</var>'s [=url/fragment=] is non-null</li>
<li><var>parsedURL</var>'s [=url/scheme=] is `"stun"` or `"stuns"`,
and <var>parsedURL</var>'s [=url/query=] is non-null</li>
</ul>
</li>
<li>
Expand All @@ -3080,12 +3081,13 @@ <h4>
</li>
<li>
<p>Let <var>hostAndPortURL</var> be result of
<a data-cite="!url#concept-url-parser">parsing</a> the concatenation of
[=basic url parser|parsing=] the concatenation of
`"https://"` and <var>parsedURL</var>'s [=url/path=].</p>
</li>
<li>
<p>If <var>hostAndPortURL</var> is failure, then [=exception/throw=] a
"{{SyntaxError}}" {{DOMException}}.</p>
<p>If <var>hostAndPortURL</var>'s [=url/path=], [=url/username=], or [=url/password=] is non-null, then [=exception/throw=] a "{{SyntaxError}}" {{DOMException}}.</p>
<p class="note">For "stun" and "stuns" schemes, this validates
[[!RFC7064]] section 3.1.<br>
For "turn" and "turns" schemes, this and the steps below validate
Expand Down

0 comments on commit 2369fad

Please sign in to comment.