ajax hacking,php - Question regarding Ajax Hacking - Stack Overflow

本文探讨了Ajax请求中的URL是否接受绝对路径,以及Same-Origin Policy如何限制JavaScript的安全性。攻击者可以制造任意HTTP请求,但无法获取响应。网站的安全性取决于其对URI的访问控制。应确保通过JavaScript访问的URI与直接浏览器请求的安全检查一致。
摘要由CSDN通过智能技术生成

My Question is does "url" attribute in the ajax request above take absolute path?

The Same Origin Policy prevents JavaScript from making a request and reading the response unless it is to the same host, port and protocol.

That doesn't stop an attacker from making any HTTP request they like (it is trivial to construct one manually that looks the same as one made via JS) and it doesn't stop an attacker from tricking a user into making any request the attacker likes (it does stop the attacker getting the response to that request though).

There is no need for the attacker to involve PHP or any other server side language to do any of this.

Also, is it possible to break any site by sending such requests?

That depends on how the site is written. You should apply the same security checks on URIs designed for access via JavaScript as those designed for access with a direct request from the browser.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值