Best Practice: Legitimate Cross-Site Scripting

前端 未结 5 1421
攒了一身酷
攒了一身酷 2020-12-24 13:46

While cross-site scripting is generally regarded as negative, I\'ve run into several situations where it\'s necessary.

I was recently working within the confines of

5条回答
  •  时光取名叫无心
    2020-12-24 14:20

    iframe remote content can be accessed by local javascript.

    The remote server just have to set the document.domain of the page.

    Eg:

    Site A contain an iframe with src='Site B/home.php'

    home.php looks like this :

    [php stuff]...[/php]
    [script type='text/javascript']document.domain='Site A'[/script]
    

提交回复
热议问题