问题描述
首先,我尽可能地搜索并阅读了所有看起来相关的问题,但没有具体回答这个问题.这不是重复的,afaik.
First of all, I searched as best I could and read all SO questions that seem relevant, but nothing specifically answered this. This is not a duplicate, afaik.
显然,如果允许在网站上进行匿名投票,则没有万无一失的方法可以防止某人多次投票.
Obviously if anonymous voting on a website is allowed, there is no fool proof way to prevent someone voting more than once.
但是,我想知道是否有经验的人可以帮助我提出一种合理可靠的方法来跟踪绝对独特的访问者并记录对这些凭据的投票.
However, I am wondering if someone with experience can aide me in coming up with a reasonably reliable way of tracking absolutely unique visitors and recording votes against those credentials.
目前我确保每个项目/会话组合只允许投一票,但是这很容易通过重新启动浏览器、更改浏览器/计算机或清除会话数据来规避.
Currently I am ensuring that only one vote per item/session combo is allowed, however this is easily circumvented by restarting browser, changing browsers/computers, or clearing your session data.
针对 IP 进行录制似乎是下一个合理的解决方案,但我想知道这是否会经常出现误报(NAT 后面的同一 LAN 上的多人将拥有相同的外部 IP 等).
Recording against IP seems the next reasonable solution but I wonder if this will get false positives too often (multiple people on same LAN behind a NAT will have same external IP, etc).
这里是否有中间立场或我忽略的其他方法/组合?
Is there a middle ground to be had here or some other method/combination I am overlooking?
推荐答案
我会在不直接询问任何问题的情况下收集尽可能多的会话数据(浏览器、操作系统、已安装的插件,以及版本号、IP 地址等)) 并对其进行哈希处理.
I'd collect as much data about the session as possible without asking any questions directly (browser, OS, installed plugins, all with versions numbers, IP address etc) and hash it.
如果您希望允许多次投票,请记录哈希值并增加一个计数器.在盐中包含时间戳(每天、每小时等)以使投票具有时间敏感性,例如每天 5 票.
Record the hash and increment a counter if you want multiple votes to be allowed. Include a timestamp (daily, hourly etc) in the salt to make votes time sensitive, say 5 votes per day.
这篇关于什么是记录匿名用户投票的可靠方法,不允许重复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!