CSRF - MDN Web Docs Glossary: Definitions of Web-related terms 编辑
CSRF (Cross-Site Request Forgery) is an attack that impersonates a trusted user and sends a website unwanted commands. This can be done, for example, by including malicious parameters in a URL behind a link that purports to go somewhere else:
<img src="https://www.example.com/index.php?action=delete&id=123">
For users who have modification permissions on https://www.example.com
, the <img>
element executes action on https://www.example.com
without their noticing, even if the element is not at https://www.example.com
.
There are many ways to prevent CSRF, such as implementing RESTful API, adding secure tokens, etc.
Learn more
General knowledge
- Cross-site request forgery on Wikipedia
- Prevention measures
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论