Changeset 208525 in webkit


Ignore:
Timestamp:
Nov 9, 2016 11:46:01 PM (7 years ago)
Author:
Philippe Normand
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.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r208518 r208525  
     12016-11-08  Philippe Normand  <pnormand@igalia.com>
     2
     3        [WebRTC] white-list turns urls from the RTCConfiguration
     4        https://bugs.webkit.org/show_bug.cgi?id=164506
     5
     6        Reviewed by Alejandro G. Castro.
     7
     8        * web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt: Rebaseline test, since turns servers are now parsed.
     9
    1102016-11-09  Brady Eidson  <beidson@apple.com>
    211
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt

    r208057 r208525  
    1515PASS new RTCPeerConnection({ iceServers: [{ urls: ["stun:stun1.example.net"] }] })
    1616PASS new RTCPeerConnection({ iceServers: [{ urls: ["stun:stun1.example.net", "stun:stun2.example.net"] }] })
    17 FAIL new RTCPeerConnection({ iceServers: [{ urls: "turns:turn.example.org", username: "user", credential: "cred" }] }) Error creating RTCPeerConnection
     17PASS new RTCPeerConnection({ iceServers: [{ urls: "turns:turn.example.org", username: "user", credential: "cred" }] })
    1818PASS new RTCPeerConnection({ iceServers: [{ urls: "turn:turn.example.net", username: "user", credential: "cred" }] })
    19 FAIL new RTCPeerConnection({ iceServers: [{ urls: ["turns:turn.example.org", "turn:turn.example.net"], username: "user", credential: "cred" }] }) Error creating RTCPeerConnection
     19PASS new RTCPeerConnection({ iceServers: [{ urls: ["turns:turn.example.org", "turn:turn.example.net"], username: "user", credential: "cred" }] })
    2020PASS new RTCPeerConnection({ iceServers: [{ urls: "stun:stun1.example.net", credentialType: "password" }] })
    2121PASS new RTCPeerConnection({ iceServers: [{ urls: "stun:stun1.example.net", credentialType: "token" }] })
     
    3131FAIL new RTCPeerConnection({ iceServers: [{ urls: "turns:turn.example.org" }] }) assert_throws: function "function () {
    3232        eval(expr);
    33       }" threw object "TypeError: Error creating RTCPeerConnection" that is not a DOMException InvalidAccessError: property "code" is equal to undefined, expected 15
     33      }" did not throw
    3434FAIL new RTCPeerConnection({ iceServers: [{ urls: "turns:turn.example.org", username: "user" }] }) assert_throws: function "function () {
    3535        eval(expr);
    36       }" threw object "TypeError: Error creating RTCPeerConnection" that is not a DOMException InvalidAccessError: property "code" is equal to undefined, expected 15
     36      }" did not throw
    3737FAIL new RTCPeerConnection({ iceServers: [{ urls: "turns:turn.example.org", credential: "cred" }] }) assert_throws: function "function () {
    3838        eval(expr);
    39       }" threw object "TypeError: Error creating RTCPeerConnection" that is not a DOMException InvalidAccessError: property "code" is equal to undefined, expected 15
     39      }" did not throw
    4040FAIL new RTCPeerConnection({ iceServers: [{ urls: "relative-url" }] }) assert_throws: function "function () {
    4141        eval(expr);
  • trunk/Source/WebCore/ChangeLog

    r208523 r208525  
     12016-11-08  Philippe Normand  <pnormand@igalia.com>
     2
     3        [WebRTC] white-list turns urls from the RTCConfiguration
     4        https://bugs.webkit.org/show_bug.cgi?id=164506
     5
     6        Reviewed by Alejandro G. Castro.
     7
     8        * Modules/mediastream/RTCConfiguration.cpp:
     9        (WebCore::validateIceServerURL): Add the turns URL scheme to the
     10        list of supported relay and signaling server protocols.
     11
    1122016-11-09  Joseph Pecoraro  <pecoraro@apple.com>
    213
  • trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.cpp

    r208118 r208525  
    4646{
    4747    URL url(URL(), iceURL);
    48     if (url.isEmpty() || !url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun")))
     48    if (url.isEmpty() || !url.isValid() || !(url.protocolIs("turn") || url.protocolIs("turns") || url.protocolIs("stun")))
    4949        return false;
    5050
Note: See TracChangeset for help on using the changeset viewer.