Now the Youtube iframe API origin parameter needs the protocol from the url according to the official documentation:

As an extra security measure, you should also include the origin parameter to the URL, specifying the URL scheme (http:// or https://) and full domain of your host page as the parameter value. While origin is optional, including it protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player

Documentation.

Error:
Untrusted origin: example.com

Comments

alzz’s picture

Status: Active » Needs review
StatusFileSize
new420 bytes

Attaching patch, please review.

alzz’s picture

Issue summary: View changes
alzz’s picture

Issue summary: View changes

  • guschilds committed 763eda1 on 7.x-1.x authored by alzz
    Issue #2427907 by alzz: Fixed untrusted origin when JS API is enabled by...

  • guschilds committed 04dcaae on 8.x-1.x
    Issue #2427907 by alzz: Fixed untrusted origin when JS API is enabled by...
guschilds’s picture

Status: Needs review » Fixed

Thanks for pointing this out and supplying a patch. It has been committed to both the 7.x-1.x and 8.x-1.x branches.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.