If cookie value already exists, then don't let a vote happen
This commit is contained in:
parent
b790b733ea
commit
f9aa709a4b
@ -236,6 +236,9 @@ def hkfcD_vote_thanks():
|
||||
if _motm and _dotd and request.method == 'POST':
|
||||
prev_identity = request.cookies.get('sessionID')
|
||||
warn(prev_identity)
|
||||
if prev_identity:
|
||||
warn("Naughty, naughty, you've already voted!")
|
||||
else:
|
||||
identity = randomUrlSuffix(8)
|
||||
id_commit = "INSERT INTO motmSessions (sessionID) VALUES ('" + identity + "')"
|
||||
sql_write(id_commit)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user