如果我免受 CSRF 的侵害,我就能免受垃圾邮件机器人的侵害吗?

发布于 2024-09-30 20:08:38 字数 465 浏览 0 评论 0原文

我已经阅读了大量有关垃圾邮件预防的内容,这是一个不断被建议的明显解决方案:

使用令牌并将其放入会话中 并将其添加到表单中。如果 令牌未随表单一起提交 或不匹配则自动进行 并且可以忽略。

来源:https://webmasters.stackexchange.com/questions/3588/how-do-spambots- 。

基本上就是说要保护自己免受 CSRF 的侵害

所以我的问题是,垃圾邮件机器人是否完全依赖于包含 CSRF 的方法?他们是否只是简单地发送重复的 POST 请求,而不实际请求页面找出表单中嵌入的隐藏令牌是什么?这似乎太容易阻止了,我对此表示怀疑。有人有这方面的具体信息吗?

I've read up quite a bit on spam prevention, and this is one apparent solution that keeps being suggested:

Use a token and put it into a session
and also add it to the form. If the
token is not submitted with the form
or doesn't match then it is automated
and can be ignored.

Source: https://webmasters.stackexchange.com/questions/3588/how-do-spambots-work

Which basically is saying to protect yourself from CSRF.

So my question is, do spambots rely entirely on a method that incorporates CSRF? Do they smply send repeat POST requests without actually requesting the page to figure out what the hidden token embedded in the form is? This seems almost suspiciously too easy to stop and I'm skeptical. Anyone have any concrete information on this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

送舟行 2024-10-07 20:08:38

想象一下爬虫访问随机 URL,如果它看到表单,则填写并提交。在这种情况下,只要在页面加载时生成令牌,就会自动接受令牌。

因此,作为额外的防御措施 - 放置严格的验证码。

Imagine crawler that visits random URL and if it sees form, fills it and submits. In this case, token will be automatically accepted, as long as generated on page load.

So, as an additional defense - place tough CAPTCHA.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文