Title: [250716] trunk/Source/WebCore
- Revision
- 250716
- Author
- [email protected]
- Date
- 2019-10-04 03:57:43 -0700 (Fri, 04 Oct 2019)
Log Message
AppleTV named as XSS-payloads trigger when AirPlay is used
https://bugs.webkit.org/show_bug.cgi?id=202534
<rdar://55931262>
Reviewed by Eric Carlson.
Ensure we escape an AirPlay's device name before inserting its name into the DOM.
* Modules/modern-media-controls/media/placard-support.js:
(PlacardSupport.prototype._updateAirPlayPlacard):
(PlacardSupport):
(escapeHTML):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (250715 => 250716)
--- trunk/Source/WebCore/ChangeLog 2019-10-04 10:06:20 UTC (rev 250715)
+++ trunk/Source/WebCore/ChangeLog 2019-10-04 10:57:43 UTC (rev 250716)
@@ -1,3 +1,18 @@
+2019-10-03 Antoine Quint <[email protected]>
+
+ AppleTV named as XSS-payloads trigger when AirPlay is used
+ https://bugs.webkit.org/show_bug.cgi?id=202534
+ <rdar://55931262>
+
+ Reviewed by Eric Carlson.
+
+ Ensure we escape an AirPlay's device name before inserting its name into the DOM.
+
+ * Modules/modern-media-controls/media/placard-support.js:
+ (PlacardSupport.prototype._updateAirPlayPlacard):
+ (PlacardSupport):
+ (escapeHTML):
+
2019-10-04 Oriol Brufau <[email protected]>
[css-grid] Preserve auto repeat() in getComputedStyle() for non-grids
Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/placard-support.js (250715 => 250716)
--- trunk/Source/WebCore/Modules/modern-media-controls/media/placard-support.js 2019-10-04 10:06:20 UTC (rev 250715)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/placard-support.js 2019-10-04 10:57:43 UTC (rev 250716)
@@ -80,7 +80,7 @@
switch(this.mediaController.host.externalDeviceType) {
case 'airplay':
- deviceName = UIString("This video is playing on ā%sā.", this.mediaController.host.externalDeviceDisplayName || UIString("Apple TV"));
+ deviceName = UIString("This video is playing on ā%sā.", escapeHTML(this.mediaController.host.externalDeviceDisplayName) || UIString("Apple TV"));
break;
case 'tvout':
deviceName = UIString("This video is playing on the TV.");
@@ -90,3 +90,10 @@
}
}
+
+function escapeHTML(unsafeString)
+{
+ var div = document.createElement("div");
+ div.textContent = unsafeString;
+ return div.innerHTML;
+}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes