weixin_33691817 2017-03-23 05:09 采纳率: 0%
浏览 489

防止XSS攻击的AJAX

I am using Latest Web server(Any) which are by default enabled with X-XSS-Protection:1; mode=block to block the possible XSS attackes.

So tried to assess my server with injection of script on to a GET request which was rejected by the server due the above filter enabled.My request looks like https://localhost:431/report/api/createlist.ams?subscriberID=%3Cscript%3Ealert(1)%3C/script%3E&_=1490175834029 ==> Rejeted by server because the source code of a script was found within the request. The server sent an 'X-XSS-Protection' header requesting this behavior.

I have some GET requests via AJAX which are still not blocked by server. Server is treating normal GET request and AJAX GET request are different. How could i reject a XSS attack is case of AJAX request as below mentioned. https://localhost:43261/tabular/reports-data/items.json?startDate=2017-03-01&endDate=2017-03-22&Type=All&bound=Inbound&dataGrouping=%3C%2Ftitle%3E%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E%3Ctitle%3E&=1490244895514 OR https://localhost:43261/tabular/reports-data/items.json?startDate=2017-03-01&endDate=2017-03-22&Type=All&bound=Inbound&dataGrouping=%alert(1)%&=1490244895514

Thanks

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Python时间序列如何拟合疏系数模型
    • ¥15 求学软件的前人们指明方向🥺
    • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
    • ¥15 MCNP里如何定义多个源?
    • ¥20 双层网络上信息-疾病传播
    • ¥50 paddlepaddle pinn
    • ¥20 idea运行测试代码报错问题
    • ¥15 网络监控:网络故障告警通知
    • ¥15 django项目运行报编码错误
    • ¥15 STM32驱动继电器