Title: [208525] trunk
Revision
208525
Author
[email protected]
Date
2016-11-09 23:46:01 -0800 (Wed, 09 Nov 2016)

Log Message

[WebRTC] white-list turns urls from the RTCConfiguration
https://bugs.webkit.org/show_bug.cgi?id=164506

Reviewed by Alejandro G. Castro.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt: Rebaseline test, since turns servers are now parsed.

Source/WebCore:

* Modules/mediastream/RTCConfiguration.cpp:
(WebCore::validateIceServerURL): Add the turns URL scheme to the
list of supported relay and signaling server protocols.

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (208524 => 208525)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-11-10 06:34:05 UTC (rev 208524)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-11-10 07:46:01 UTC (rev 208525)
@@ -1,3 +1,12 @@
+2016-11-08  Philippe Normand  <[email protected]>
+
+        [WebRTC] white-list turns urls from the RTCConfiguration
+        https://bugs.webkit.org/show_bug.cgi?id=164506
+
+        Reviewed by Alejandro G. Castro.
+
+        * web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt: Rebaseline test, since turns servers are now parsed.
+
 2016-11-09  Brady Eidson  <[email protected]>
 
         IndexedDB 2.0: Clean up some exception ordering.

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt (208524 => 208525)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt	2016-11-10 06:34:05 UTC (rev 208524)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt	2016-11-10 07:46:01 UTC (rev 208525)
@@ -14,9 +14,9 @@
 FAIL new RTCPeerConnection({ iceServers: [{ urls: [] }] }) Error creating RTCPeerConnection
 PASS new RTCPeerConnection({ iceServers: [{ urls: ["stun:stun1.example.net"] }] }) 
 PASS new RTCPeerConnection({ iceServers: [{ urls: ["stun:stun1.example.net", "stun:stun2.example.net"] }] }) 
-FAIL new RTCPeerConnection({ iceServers: [{ urls: "turns:turn.example.org", username: "user", credential: "cred" }] }) Error creating RTCPeerConnection
+PASS new RTCPeerConnection({ iceServers: [{ urls: "turns:turn.example.org", username: "user", credential: "cred" }] }) 
 PASS new RTCPeerConnection({ iceServers: [{ urls: "turn:turn.example.net", username: "user", credential: "cred" }] }) 
-FAIL new RTCPeerConnection({ iceServers: [{ urls: ["turns:turn.example.org", "turn:turn.example.net"], username: "user", credential: "cred" }] }) Error creating RTCPeerConnection
+PASS new RTCPeerConnection({ iceServers: [{ urls: ["turns:turn.example.org", "turn:turn.example.net"], username: "user", credential: "cred" }] }) 
 PASS new RTCPeerConnection({ iceServers: [{ urls: "stun:stun1.example.net", credentialType: "password" }] }) 
 PASS new RTCPeerConnection({ iceServers: [{ urls: "stun:stun1.example.net", credentialType: "token" }] }) 
 FAIL new RTCPeerConnection({ iceServers: [{ urls: "turn:turn.example.net" }] }) assert_throws: function "function () {
@@ -30,13 +30,13 @@
       }" did not throw
 FAIL new RTCPeerConnection({ iceServers: [{ urls: "turns:turn.example.org" }] }) assert_throws: function "function () {
         eval(expr);
-      }" threw object "TypeError: Error creating RTCPeerConnection" that is not a DOMException InvalidAccessError: property "code" is equal to undefined, expected 15
+      }" did not throw
 FAIL new RTCPeerConnection({ iceServers: [{ urls: "turns:turn.example.org", username: "user" }] }) assert_throws: function "function () {
         eval(expr);
-      }" threw object "TypeError: Error creating RTCPeerConnection" that is not a DOMException InvalidAccessError: property "code" is equal to undefined, expected 15
+      }" did not throw
 FAIL new RTCPeerConnection({ iceServers: [{ urls: "turns:turn.example.org", credential: "cred" }] }) assert_throws: function "function () {
         eval(expr);
-      }" threw object "TypeError: Error creating RTCPeerConnection" that is not a DOMException InvalidAccessError: property "code" is equal to undefined, expected 15
+      }" did not throw
 FAIL new RTCPeerConnection({ iceServers: [{ urls: "relative-url" }] }) assert_throws: function "function () {
         eval(expr);
       }" threw object "TypeError: Error creating RTCPeerConnection" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12

Modified: trunk/Source/WebCore/ChangeLog (208524 => 208525)


--- trunk/Source/WebCore/ChangeLog	2016-11-10 06:34:05 UTC (rev 208524)
+++ trunk/Source/WebCore/ChangeLog	2016-11-10 07:46:01 UTC (rev 208525)
@@ -1,3 +1,14 @@
+2016-11-08  Philippe Normand  <[email protected]>
+
+        [WebRTC] white-list turns urls from the RTCConfiguration
+        https://bugs.webkit.org/show_bug.cgi?id=164506
+
+        Reviewed by Alejandro G. Castro.
+
+        * Modules/mediastream/RTCConfiguration.cpp:
+        (WebCore::validateIceServerURL): Add the turns URL scheme to the
+        list of supported relay and signaling server protocols.
+
 2016-11-09  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: DebuggerManager.Event.Resumed introduces test flakiness

Modified: trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.cpp (208524 => 208525)


--- trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.cpp	2016-11-10 06:34:05 UTC (rev 208524)
+++ trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.cpp	2016-11-10 07:46:01 UTC (rev 208525)
@@ -45,7 +45,7 @@
 static bool validateIceServerURL(const String& iceURL)
 {
     URL url(URL(), iceURL);
-    if (url.isEmpty() || !url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun")))
+    if (url.isEmpty() || !url.isValid() || !(url.protocolIs("turn") || url.protocolIs("turns") || url.protocolIs("stun")))
         return false;
 
     return true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to