我的代码中的跨站点脚本漏洞? [关闭]

问题描述 投票:-2回答:1

此代码有什么问题?第9行出现了问题。例如某些机构可以破解此网址。如何保护此网址。有人可以对此提供帮助吗?

<HTML>
    <head>
    <title>reports</title>
    <script language="javascript">
    if(sur == -1){
        parent.frame2.document.write('<form>')
        with(parent.frame2.document)
        write('<pre>' + '<h4>')
        write("    " + '<a href="javascript:parent.goToMtcRpt(\'/cgi-in/rep_gtlsts?ds1_8_d.htm\')">DS1 8-day...</a>' + '<br>')
    </script>
    </head>
</HTML>
javascript html xss
1个回答
0
投票

我认为该漏洞可能是由您使用with关键字引起的,which is not recommended and even forbidden by the standard in strict mode.

© www.soinside.com 2019 - 2024. All rights reserved.