hls.js 1.5.13-0.canary.10404 → 1.5.13-0.canary.10408

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hls-demo.js CHANGED
@@ -24410,6 +24410,17 @@
24410
24410
  return;
24411
24411
  }
24412
24412
  url = $('#streamURL').val();
24413
+
24414
+ // Check if the URL is valid to avoid XSS issue.
24415
+ if (url) {
24416
+ try {
24417
+ new URL(url);
24418
+ } catch (error) {
24419
+ $('#streamURL').val('');
24420
+ alert('Invalid URL');
24421
+ return false;
24422
+ }
24423
+ }
24413
24424
  setupGlobals();
24414
24425
  hideCanvas();
24415
24426
  if (hls) {