开发者

Protect iframe. One domain for the iframe?

I have a iframe. This iframe open a domain. But how can i protect this iframe. When i go to this iframe i get this url: http://.........nl/rganisatie/werken_bij/vacatures?u=http%3A//vacatures.wrij.nl/

But no can change people the domain name of the iframe. When you change vacatures.wrij.nl/ 开发者_Go百科to a other website. The iframe open a other domain / website. I would protect this.

How can i make with javascript. That the iframe open only one domain?

Thanks!


You must validate the URL server-side.

Notice, that your site is prone to many attacks, including JS injection!!! (I found it on google using information you provided in your question...)

Generally:

  • IFrames are evil, avoid them. Use AJAX instead.
  • Never trust user-provided data!
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜