#588 ✓resolved
neryo

bug simple poll

Reported by neryo | April 24th, 2012 @ 03:06 PM | in 2.0.7 (closed)

Hi,
there's a bug simple poll module.. if the simple poll is "open voting" when a not logged user tries to vote with at least one vote done, it's like the user has already voted even if has another ip address. I've seen in the database that the column user_id in the exponent_poll_timeblock table is always 0 and ip_hash is empty.. so it seems that $user is not an object or/and $user->id is 0.

i've fixed it in simplepollmodule/action/vote.php:

replace
if ($user)

with
if (is_object($user) && $user->id > 0)

there are 2 rows to replace.

i think it's always better to check objects and arrays properly before using them

bye

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Bug Tracker for Exponent CMS

Shared Ticket Bins

People watching this ticket

Pages