Skip to content

Commit

Permalink
Use simple string comparison for query string
Browse files Browse the repository at this point in the history
and forbid query string on stun/stuns
see #2996 (comment)
  • Loading branch information
dontcallmedom committed Sep 4, 2024
1 parent bbc6fd4 commit 7601b0d
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -3092,14 +3092,10 @@ <h4>
[[!RFC7065]] section 3.1.</p>
</li>
<li>
<p>If <var>parsedURL</var>'s [=url/query=] is non-null, run the following
sub-steps and if any of them fail, [=exception/throw=] a "{{SyntaxError}}" {{DOMException}} :</p>
<ol>
<li>Let <var>urlParams</var> be the result of applying <a data-cite="url#concept-urlencoded-string-parser"><code>application/x-www-form-urlencoded</code> string parser</a> to <var>parsedURL</var>'s [=url/query=].</li>
<li>If <var>urlParams</var>’s [=list/size=] is greater than 1, then fail.</li>
<li>If <var>urlParams</var>’s [=list/size=] is 1, let <code>(<var>paramName</var>, <var>paramValue</var>)</code> be the two items of <code><var>urlParams/var>[0]</code>.</li>
<li>If <var>paramName</var> is set and different from <code>"transport"</code>, then fail.</li>
<li>If <var>paramValue</var> is set and different from <code>"udp"</code> or <code>"tcp"</code>, then fail.</li>
<p>If <var>parsedURL</var>'s [=url/query=] is non-null, run the following sub-steps and if any of them fail, [=exception/throw=] a "{{SyntaxError}}" {{DOMException}}:</p>
<ol>
<li>If <var>parsedURL</var>'s [=url/scheme=] is <code>"stun"</code> or <code>"stuns"</code>, then fail.</li>
<li>if <var>parsedURL</var>'s [=url/query=] is different from either <code>"transport=udp"</code> or <code>"transport=tcp"</code>, then fail.</li>
</ol>
</li>
<li>
Expand Down

0 comments on commit 7601b0d

Please sign in to comment.