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/
94 stars 78 forks source link

IP Address is easily spoofable #104

Closed gabcoh closed 6 years ago

gabcoh commented 6 years ago

It is very easy to spoof your IP by just setting the 'Client-IP' header in your HTTP request. This allows you to bypass the IP check and vote multiple times. This is due to the get_ipaddress function looking first for the IP in user supplied headers, rather than the server populated 'REMOTE_ADDR' https://github.com/lesterchan/wp-polls/blob/b85b3beffa84cb468ba80ccf60a597f4124e20c1/wp-polls.php#L724

I would understand if this is supposed to allow people to vote behind proxies, but otherwise it seems like a bug.

p.s. other than this, great work! I really like the plugin!