Wouter Zelle wrote:
> Hi everyone,
> 
> It seems that here is a bug in the Poll (from the Hippo Community Apps).
> When the user votes and then reloads the page, this can result in a
> repost. This is counted as another vote, which should not happen. It
> seems that the bug is in the following code from PollGenerator:
> 
> if (cookie != null)
>   config.setVoted(true);
> if (request.getParameter("pollid") != null &&
> request.getParameter("vote") != null) {
>   //process the vote
> }
> 
> The second 'if' is evaluated even when there is a cookie, resulting in a
> vote. A fix is to use 'else if' to prevent the second check from being
> evaluated if there is a cookie.
Thanks for pointing this out. I will take a look at it.

Regards,
Bart


-- 

Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
[EMAIL PROTECTED] / http://www.hippo.nl
--------------------------------------------------------------
********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Reply via email to