Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to load and execute Ads/Js from every source #1319

Closed
dannylinden opened this issue Jan 6, 2016 · 1 comment
Closed

Possible to load and execute Ads/Js from every source #1319

dannylinden opened this issue Jan 6, 2016 · 1 comment

Comments

@dannylinden
Copy link

the current "adtech" ad implementation make it possible to load Ads from every host, its not a real validation to check prefix and folder only!?

export function adtech(global, data) {
  const src = data.src;
  validateSrcPrefix('https:', src);
  validateSrcContains('/addyn/', src);
  writeScript(global, src);
}

Demo:
http://dannylinden.de/amp/ad-test.amp.html#development=1
bildschirmfoto 2016-01-06 um 21 17 44

@cramforce
Copy link
Member

Yes, we kind of don't care since we consider ads hostile anyway, so people might as well load their stuff from where ever they want.

We also support loading the iframes from arbitrary origins
https://github.com/ampproject/amphtml/blob/master/builtins/amp-ad.md#running-ads-from-a-custom-domain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants