未注册账户该如何处理?

发布于 2024-09-25 02:30:53 字数 207 浏览 1 评论 0原文

我的印象是,当我第一次访问 Stack Overflow 时,它会将我的 IP 地址记录为用户,因为我可以在不登录的情况下提出问题(传统意义上),但我仍然被跟踪。

这就是SO所做的吗?将未登录用户作为 IP 地址?或者是 cookie/会话和 IP 的组合?

我想实现类似的解决方案,但我担心 IP 修改和用户伪造 IP 来获取其他用户的帐户。我应该如何处理这个问题?

My impression is that, when I hit Stack Overflow for the first time, it records my IP address as a user since I can ask a question without being logged in, in the traditional sense, but I'm still tracked.

Is this what SO does? Base a non-logged in user as an IP address? Or is it a combination of cookies/sessions and IP?

I want to implement a similar solution, but I'm afraid of IP modification and users faking an IP to obtain another user's account. How should I handle this?

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

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

发布评论

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

评论(1

〗斷ホ乔殘χμё〖 2024-10-02 02:30:53

Stack Overflow 使用 cookie 而不是您的 IP 地址。您可能使用了错误配置(可能是故意)的代理,因此 IP 地址无论如何都不可靠。 (这是凭记忆写的,我已经很久没有故意退出过SO了。;)

通过使用与“普通”登录cookie相同的做法,您可以像信任注册帐户一样信任它。唯一需要注意的是,每当新用户/注销用户访问该网站时,您都必须生成它,或者更好的是,当他们执行需要跟踪的操作时(例如在 SO 示例中发布问题)。

Stack Overflow uses a cookie rather than your IP address. You could be using a mis-configured (perhaps on purpose) proxy, so IP address isn't reliable anyway. (This is from memory, I haven't been intentionally logged out of SO in a long time. ;)

By using the same practices as you do with "normal" login cookies, you can trust it just as much as registered accounts. The only caveat is you have to generate it whenever a new/logged-out user visits the site—or better, right as they do something that requires tracking (such as post a question in the example of SO).

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