Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

bug simple poll

#588

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

Reported by neryo · April 24th, 2012 @ 03:06 PM

State: resolved
Milestone: 2.0.7
Assigned to: dleffler dleffler

Activity

  1. expNinja
    expNinja
    • State changed from new to resolved
    • Milestone set to 2.0.7
    • Milestone order changed from 99 to 0

    (from [21a00d5cf812a6dfb6fb2841f8f2611fea0e2ddc]) Should fix an issue with simple poll voting by anonmymous users [#588 bug simple poll state:resolved milestone:2.0.7] https://github.com/exponentcms/exponent-cms/commit/21a00d5cf812a6df...

    April 24th, 2012 @ 03:24 PM

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.