From bbc6fd44ab246bf0ac98c945033f3bb638053031 Mon Sep 17 00:00:00 2001
From: Dominique Hazael-Massieux
Date: Tue, 3 Sep 2024 15:35:02 +0200
Subject: [PATCH] Complete ice server url validation
close #2912
---
amendments.json | 2 +-
webrtc.html | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/amendments.json b/amendments.json
index a9e2017a1..77bbe0568 100644
--- a/amendments.json
+++ b/amendments.json
@@ -55,7 +55,7 @@
},
{
"description": "Use the url spec to parse ice server urls",
- "pr": 2853,
+ "pr": [2853, 2996],
"type": "correction",
"status": "candidate",
"id": 33
diff --git a/webrtc.html b/webrtc.html
index 97982864d..b1d9b4474 100644
--- a/webrtc.html
+++ b/webrtc.html
@@ -3093,9 +3093,13 @@
If parsedURL's [=url/query=] is non-null, run the following
- sub-steps:
+ sub-steps and if any of them fail, [=exception/throw=] a "{{SyntaxError}}" {{DOMException}} :
- TODO: validate ?transport=udp|tcp
+ - Let urlParams be the result of applying
application/x-www-form-urlencoded
string parser to parsedURL's [=url/query=].
+ - If urlParams’s [=list/size=] is greater than 1, then fail.
+ - If urlParams’s [=list/size=] is 1, let
(paramName, paramValue)
be the two items of urlParams/var>[0]
.
+ - If paramName is set and different from
"transport"
, then fail.
+ - If paramValue is set and different from
"udp"
or "tcp"
, then fail.