The problem

When using proxy-cache mechanisms like Varnish or SquidCache anonymous users get's the same ip.
By using the current

"function _vote_up_down_get_uid in vote_up_down.module"

will only allow one anonymous user to add vote.

The solution

The solution is to check that the variable

$_SERVER['HTTP_X_FORWARDED_FOR'] 

isset like they do in the

"function votinapi_add_vote in the votinapi.module"

.

Check attached file for a propose on a solution.

CommentFileSizeAuthor
patch_144.txt684 bytesdeplifer

Comments

deplifer’s picture

Title: Anonymous Users and HTTP_X_FORWARDED_FOR » Mistype

Sorry for the mistype in votingapi.

frjo’s picture

Title: Mistype » Anonymous Users and HTTP_X_FORWARDED_FOR
Status: Active » Fixed

Committed to HEAD, thanks for the code! Please try it out and report back here.

Anonymous’s picture

Status: Fixed » Closed (fixed)
jenlampton’s picture

Version: » 7.x-1.x-dev
Assigned: Unassigned » jenlampton
Issue summary: View changes
Status: Closed (fixed) » Active

Looks like this is also an issue for the 7.x version.

  • frjo committed a905327 on 8.x-1.x
    Anonymous Users voting and HTTP_X_FORWARDED_FOR in issue #153941, report...
rickharington’s picture

Not sure if this is related but I;'m just using standard caching on my views (where I have the widget enabled) and anonymous users are shown that they have already voted. Is this related or a separate/new issue?

  • frjo committed a905327 on 7.x-2.x
    Anonymous Users voting and HTTP_X_FORWARDED_FOR in issue #153941, report...