From 2511d726638920330725b1bab6e9786d20d00e3c Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 28 May 2014 14:55:50 +0200 Subject: [PATCH] Do not allow response if the invitation has already been processed --- public/vroom.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/vroom.pl b/public/vroom.pl index 34754b1..3b93e67 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -484,7 +484,7 @@ helper add_invitation => sub { helper get_invitation => sub { my $self = shift; my ($id) = @_; - my $sth = eval { $self->db->prepare("SELECT * FROM `invitations` WHERE `token`=?;") } || return undef; + my $sth = eval { $self->db->prepare("SELECT * FROM `invitations` WHERE `token`=? AND `processed`='0';") } || return undef; $sth->execute($id) || return undef; return $sth->fetchall_hashref('token')->{$id}; };