Changeset 213283 in webkit
- Timestamp:
- Mar 2, 2017 8:24:30 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r213282 r213283 1 2017-03-02 Youenn Fablet <youenn@apple.com> 2 3 [WebRTC] Activate ICE candidate privacy policy 4 https://bugs.webkit.org/show_bug.cgi?id=168975 5 6 Reviewed by Alex Christensen. 7 8 * webrtc/datachannel/filter-ice-candidate-expected.txt: Added. 9 * webrtc/datachannel/filter-ice-candidate.html: Added. 10 1 11 2017-03-02 Youenn Fablet <youenn@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r213281 r213283 1 2017-03-02 Youenn Fablet <youenn@apple.com> 2 3 [WebRTC] Activate ICE candidate privacy policy 4 https://bugs.webkit.org/show_bug.cgi?id=168975 5 6 Reviewed by Alex Christensen. 7 8 Test: webrtc/datachannel/filter-ice-candidate.html 9 10 * testing/Internals.cpp: 11 (WebCore::Internals::Internals): Disabling ICE candidate filtering by default for rwt. 12 (WebCore::Internals::setICECandidateFiltering): 13 * testing/Internals.h: 14 * testing/Internals.idl: 15 1 16 2017-03-02 Eric Carlson <eric.carlson@apple.com> 2 17 -
trunk/Source/WebCore/testing/Internals.cpp
r213234 r213283 461 461 enableMockMediaEndpoint(); 462 462 useMockRTCPeerConnectionFactory(String()); 463 #if USE(LIBWEBRTC) 464 if (document.page()) { 465 document.page()->libWebRTCProvider().enableEnumeratingAllNetworkInterfaces(); 466 document.page()->rtcController().disableICECandidateFiltering(); 467 } 468 #endif 463 469 #endif 464 470 … … 1165 1171 UNUSED_PARAM(testCase); 1166 1172 #endif 1173 } 1174 1175 void Internals::setICECandidateFiltering(bool enabled) 1176 { 1177 Document* document = contextDocument(); 1178 auto* page = document->page(); 1179 if (!page) 1180 return; 1181 auto& rtcController = page->rtcController(); 1182 if (enabled) 1183 rtcController.enableICECandidateFiltering(); 1184 else 1185 rtcController.disableICECandidateFiltering(); 1167 1186 } 1168 1187 -
trunk/Source/WebCore/testing/Internals.h
r213234 r213283 399 399 void emulateRTCPeerConnectionPlatformEvent(RTCPeerConnection&, const String& action); 400 400 void useMockRTCPeerConnectionFactory(const String&); 401 void setICECandidateFiltering(bool); 401 402 #endif 402 403 -
trunk/Source/WebCore/testing/Internals.idl
r213169 r213283 442 442 [Conditional=WIRELESS_PLAYBACK_TARGET, MayThrowException] void setMockMediaPlaybackTargetPickerState(DOMString deviceName, DOMString deviceState); 443 443 [Conditional=MEDIA_STREAM] void setMockMediaCaptureDevicesEnabled(boolean enabled); 444 444 445 [Conditional=WEB_RTC] void emulateRTCPeerConnectionPlatformEvent(RTCPeerConnection connection, DOMString action); 445 446 [Conditional=WEB_RTC] void useMockRTCPeerConnectionFactory(DOMString testCase); 447 [Conditional=WEB_RTC] void setICECandidateFiltering(boolean enabled); 446 448 447 449 [Conditional=VIDEO] void simulateSystemSleep(); -
trunk/Source/WebKit/mac/ChangeLog
r213260 r213283 1 2017-03-02 Youenn Fablet <youenn@apple.com> 2 3 [WebRTC] Activate ICE candidate privacy policy 4 https://bugs.webkit.org/show_bug.cgi?id=168975 5 6 Reviewed by Alex Christensen. 7 8 * WebView/WebPreferenceKeysPrivate.h: 9 * WebView/WebPreferences.mm: 10 (-[WebPreferences enumeratingAllNetworkInterfacesEnabled]): 11 (-[WebPreferences setEnumeratingAllNetworkInterfacesEnabled:]): 12 (-[WebPreferences iceCandidateFilteringEnabled]): 13 (-[WebPreferences setIceCandidateFilteringEnabled:]): 14 * WebView/WebPreferencesPrivate.h: 15 1 16 2017-03-01 Alex Christensen <achristensen@webkit.org> 2 17 -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r212776 r213283 222 222 #define WebKitMediaDataLoadsAutomaticallyPreferenceKey @"WebKitMediaDataLoadsAutomatically" 223 223 #define WebKitMockCaptureDevicesEnabledPreferenceKey @"WebKitMockCaptureDevicesEnabled" 224 #define WebKitEnumeratingAllNetworkInterfacesEnabledPreferenceKey @"WebKitEnumeratingAllNetworkInterfacesEnabled" 225 #define WebKitICECandidateFilteringEnabledPreferenceKey @"WebKitICECandidateFilteringEnabled" 224 226 #define WebKitMediaCaptureRequiresSecureConnectionPreferenceKey @"WebKitMediaCaptureRequiresSecureConnection" 225 227 #define WebKitAttachmentElementEnabledPreferenceKey @"WebKitAttachmentElementEnabled" -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r212776 r213283 2835 2835 } 2836 2836 2837 - (BOOL)enumeratingAllNetworkInterfacesEnabled 2838 { 2839 return [self _boolValueForKey:WebKitEnumeratingAllNetworkInterfacesEnabledPreferenceKey]; 2840 } 2841 2842 - (void)setEnumeratingAllNetworkInterfacesEnabled:(BOOL)flag 2843 { 2844 [self _setBoolValue:flag forKey:WebKitEnumeratingAllNetworkInterfacesEnabledPreferenceKey]; 2845 } 2846 2847 - (BOOL)iceCandidateFilteringEnabled 2848 { 2849 return [self _boolValueForKey:WebKitICECandidateFilteringEnabledPreferenceKey]; 2850 } 2851 2852 - (void)setIceCandidateFilteringEnabled:(BOOL)flag 2853 { 2854 [self _setBoolValue:flag forKey:WebKitICECandidateFilteringEnabledPreferenceKey]; 2855 } 2856 2837 2857 - (BOOL)mediaCaptureRequiresSecureConnection 2838 2858 { -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r212776 r213283 497 497 - (BOOL)mockCaptureDevicesEnabled; 498 498 499 - (void)setEnumeratingAllNetworkInterfacesEnabled:(BOOL)flag; 500 - (BOOL)enumeratingAllNetworkInterfacesEnabled; 501 502 - (void)setIceCandidateFilteringEnabled:(BOOL)flag; 503 - (BOOL)iceCandidateFilteringEnabled; 504 499 505 - (void)setMediaCaptureRequiresSecureConnection:(BOOL)flag; 500 506 - (BOOL)mediaCaptureRequiresSecureConnection; -
trunk/Source/WebKit2/ChangeLog
r213278 r213283 1 2017-03-02 Youenn Fablet <youenn@apple.com> 2 3 [WebRTC] Activate ICE candidate privacy policy 4 https://bugs.webkit.org/show_bug.cgi?id=168975 5 6 Reviewed by Alex Christensen. 7 8 Disabling network enumeration by default. 9 Enabling ICE candidate filtering by default. 10 Chaning ICE candidate filtering according userMediaAccess policy: 11 - If access is denied, filtering is on. 12 - If access is granted, filtering is off. 13 14 * Shared/WebPageCreationParameters.cpp: 15 (WebKit::WebPageCreationParameters::encode): 16 (WebKit::WebPageCreationParameters::decode): 17 * Shared/WebPageCreationParameters.h: 18 * Shared/WebPreferencesDefinitions.h: 19 * UIProcess/API/C/WKPreferences.cpp: 20 (WKPreferencesSetICECandidateFilteringEnabled): 21 (WKPreferencesGetICECandidateFilteringEnabled): 22 (WKPreferencesSetEnumeratingAllNetworkInterfacesEnabled): 23 (WKPreferencesGetEnumeratingAllNetworkInterfacesEnabled): 24 * UIProcess/API/C/WKPreferencesRefPrivate.h: 25 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: 26 (WebKit::toWebCore): 27 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): 28 * UIProcess/UserMediaProcessManager.cpp: 29 (WebKit::UserMediaProcessManager::willCreateMediaStream): 30 (WebKit::UserMediaProcessManager::endedCaptureSession): 31 * UIProcess/WebPageProxy.cpp: 32 (WebKit::WebPageProxy::creationParameters): 33 * WebProcess/WebPage/WebPage.cpp: 34 1 35 2017-03-02 Tomas Popela <tpopela@redhat.com> 2 36 -
trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp
r213012 r213283 95 95 encoder << overrideContentSecurityPolicy; 96 96 #if ENABLE(WEB_RTC) 97 encoder << disableICECandidateFiltering;97 encoder << iceCandidateFilteringEnabled; 98 98 #if USE(LIBWEBRTC) 99 encoder << en ableEnumeratingAllNetworkInterfaces;99 encoder << enumeratingAllNetworkInterfacesEnabled; 100 100 #endif 101 101 #endif … … 223 223 224 224 #if ENABLE(WEB_RTC) 225 if (!decoder.decode(parameters. disableICECandidateFiltering))225 if (!decoder.decode(parameters.iceCandidateFilteringEnabled)) 226 226 return false; 227 227 #if USE(LIBWEBRTC) 228 if (!decoder.decode(parameters.en ableEnumeratingAllNetworkInterfaces))228 if (!decoder.decode(parameters.enumeratingAllNetworkInterfacesEnabled)) 229 229 return false; 230 230 #endif -
trunk/Source/WebKit2/Shared/WebPageCreationParameters.h
r212745 r213283 148 148 149 149 #if ENABLE(WEB_RTC) 150 bool disableICECandidateFiltering { false };150 bool iceCandidateFilteringEnabled { true }; 151 151 #if USE(LIBWEBRTC) 152 bool en ableEnumeratingAllNetworkInterfaces{ false };152 bool enumeratingAllNetworkInterfacesEnabled { false }; 153 153 #endif 154 154 #endif -
trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
r213221 r213283 226 226 macro(MockCaptureDevicesEnabled, mockCaptureDevicesEnabled, Bool, bool, false, "", "") \ 227 227 macro(MediaCaptureRequiresSecureConnection, mediaCaptureRequiresSecureConnection, Bool, bool, true, "", "") \ 228 macro(EnumeratingAllNetworkInterfacesEnabled, enumeratingAllNetworkInterfacesEnabled, Bool, bool, false, "", "") \ 229 macro(ICECandidateFilteringEnabled, iceCandidateFilteringEnabled, Bool, bool, true, "", "") \ 228 230 macro(ShadowDOMEnabled, shadowDOMEnabled, Bool, bool, true, "Shadow DOM", "HTML Shadow DOM prototype") \ 229 231 macro(FetchAPIEnabled, fetchAPIEnabled, Bool, bool, true, "", "") \ -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
r212776 r213283 1542 1542 } 1543 1543 1544 void WKPreferencesSetICECandidateFilteringEnabled(WKPreferencesRef preferencesRef, bool enabled) 1545 { 1546 toImpl(preferencesRef)->setICECandidateFilteringEnabled(enabled); 1547 } 1548 1549 bool WKPreferencesGetICECandidateFilteringEnabled(WKPreferencesRef preferencesRef) 1550 { 1551 return toImpl(preferencesRef)->iceCandidateFilteringEnabled(); 1552 } 1553 1554 void WKPreferencesSetEnumeratingAllNetworkInterfacesEnabled(WKPreferencesRef preferencesRef, bool enabled) 1555 { 1556 toImpl(preferencesRef)->setEnumeratingAllNetworkInterfacesEnabled(enabled); 1557 } 1558 1559 bool WKPreferencesGetEnumeratingAllNetworkInterfacesEnabled(WKPreferencesRef preferencesRef) 1560 { 1561 return toImpl(preferencesRef)->enumeratingAllNetworkInterfacesEnabled(); 1562 } 1563 1544 1564 void WKPreferencesSetMediaCaptureRequiresSecureConnection(WKPreferencesRef preferencesRef, bool enabled) 1545 1565 { -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
r213015 r213283 423 423 424 424 // Defaults to true. 425 WK_EXPORT void WKPreferencesSetICECandidateFilteringEnabled(WKPreferencesRef, bool); 426 WK_EXPORT bool WKPreferencesGetICECandidateFilteringEnabled(WKPreferencesRef); 427 428 // Defaults to false. 429 WK_EXPORT void WKPreferencesSetEnumeratingAllNetworkInterfacesEnabled(WKPreferencesRef, bool); 430 WK_EXPORT bool WKPreferencesGetEnumeratingAllNetworkInterfacesEnabled(WKPreferencesRef); 431 432 // Defaults to true. 425 433 WK_EXPORT void WKPreferencesSetMediaCaptureRequiresSecureConnection(WKPreferencesRef, bool); 426 434 WK_EXPORT bool WKPreferencesGetMediaCaptureRequiresSecureConnection(WKPreferencesRef); -
trunk/Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
r209512 r213283 158 158 break; 159 159 } 160 160 161 161 ASSERT_NOT_REACHED(); 162 162 return static_cast<uint64_t>(UserMediaRequest::MediaAccessDenialReason::OtherFailure); -
trunk/Source/WebKit2/UIProcess/UserMediaProcessManager.cpp
r210097 r213283 129 129 130 130 unsigned currentExtensions = state.sandboxExtensionsGranted(); 131 132 #if ENABLE(WEB_RTC) && USE(LIBWEBRTC) 133 if (currentExtensions == ProcessState::SandboxExtensionsGranted::None && (withAudio || withVideo)) 134 proxy.page().process().send(Messages::WebPage::DisableICECandidateFiltering(), proxy.page().pageID()); 135 #endif 136 131 137 if (!(requiredExtensions & currentExtensions)) { 132 138 SandboxExtension::HandleArray handles; … … 193 199 return; 194 200 201 #if ENABLE(WEB_RTC) && USE(LIBWEBRTC) 202 if (currentExtensions == ProcessState::SandboxExtensionsGranted::None && proxy.page().preferences().iceCandidateFilteringEnabled()) 203 proxy.page().process().send(Messages::WebPage::EnableICECandidateFiltering(), proxy.page().pageID()); 204 #endif 205 195 206 state.setSandboxExtensionsGranted(currentExtensions); 196 207 proxy.page().process().send(Messages::WebPage::RevokeUserMediaDeviceSandboxExtensions(params), proxy.page().pageID()); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r213278 r213283 5572 5572 5573 5573 #if ENABLE(WEB_RTC) 5574 // FIXME: We should tie ICE filtering with getUserMedia permission. 5575 parameters.disableICECandidateFiltering = true; 5574 parameters.iceCandidateFilteringEnabled = m_preferences->iceCandidateFilteringEnabled(); 5576 5575 #if USE(LIBWEBRTC) 5577 // FIXME: Turn down network interface enumeration by default. 5578 parameters.enableEnumeratingAllNetworkInterfaces = true; 5576 parameters.enumeratingAllNetworkInterfacesEnabled = m_preferences->enumeratingAllNetworkInterfacesEnabled(); 5579 5577 #endif 5580 5578 #endif -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r213278 r213283 554 554 555 555 #if ENABLE(WEB_RTC) 556 if ( parameters.disableICECandidateFiltering)556 if (!parameters.iceCandidateFilteringEnabled) 557 557 disableICECandidateFiltering(); 558 558 #if USE(LIBWEBRTC) 559 if (parameters.en ableEnumeratingAllNetworkInterfaces)559 if (parameters.enumeratingAllNetworkInterfacesEnabled) 560 560 enableEnumeratingAllNetworkInterfaces(); 561 561 #endif
Note: See TracChangeset
for help on using the changeset viewer.