lesterchan / wp-polls

Adds an AJAX poll system to your WordPress blog. You can also easily add a poll into your WordPress's blog post/page.
https://wordpress.org/plugins/wp-polls/
93 stars 78 forks source link

Even with username logging users can vote more than once #65

Closed patrix87 closed 8 years ago

patrix87 commented 8 years ago

Who Is Allowed To Vote? Allow To Vote : Registered Users Only

Logging Method Poll Logging Method: Log by Username

User can still vote more than once by pressing Shit+F5 in chrome to refresh the page.

lesterchan commented 8 years ago

Are you using any caching plugin? Are you able to reproduce this problem with a fresh install of WP and the plugin?

By right it should not. It will query the DB and check so shift F5 your page doesn't matter. I will see if I can reproduce this on my dev site.

Also voting is done by AJAX, so even refreshing the page doesn't matter. So I am not sure what you mean.

patrix87 commented 8 years ago

No caching plugins but I thing I was logged as admin if that matter?

lesterchan commented 8 years ago

Nope it doesn't matter. I just tried on my dev site https://lesterchan.net/wordpress_dev/ (the poll is on the right and there are two registered users voted) and I can't reproduce the problem.

Let me know if you can reproduce it on a fresh install of WP and WP-Polls, if not I can't do anything as well. I don't solve plugin/theme conflicts and hence fresh install is very important.

patrix87 commented 8 years ago

here's the page http://multi-jeux.quebec/sondage-carte-exile/

Maybe Visual composer is interfering.

But if I go in Manage polls and then in the logs of that poll I see :

There are a total of 0 recorded votes for this poll. » 0 votes are cast by registered users » 0 votes are cast by comment authors » 0 votes are cast by guests

But in Edit I can see 4 Votes for the same answer *(all me)

If I set Cookie and IP it's working fine but I have no logs.

lesterchan commented 8 years ago

It is weird that you have no logs, could you check to see if wp_pollsip table has been created? If it has been created, there should be logs.

Again based on the site I tested, here are my logs. manage polls lester chan s wordpress plugins development wordpress

Looks like something weird is happening with your WP

patrix87 commented 8 years ago

I do have a wp_pollsip table created and populated...

I think if there's a problem it's with the page that shows the polls directly...

Also, do you think you could add a setting to let other level of users, use the polls ?

I would like editor to be able to create one as well.

Thanks.

*(Logging by IP and Cookie works fine for me, I don't really need the username logging)

patrix87 commented 8 years ago

Oh well the poll management was an easy fix :P

Line 1881 of wp-polls.php

$role = get_role( 'editor' ); if( ! $role->has_cap( 'manage_polls' ) ) { $role->add_cap( 'manage_polls' ); }

lesterchan commented 8 years ago

Found the problem https://wordpress.org/support/topic/1-vote-per-user?replies=11,

I will disable private IP