VotingAPI's current method of handling the user's hostname in votingapi_add_vote() uses HTTP_X_FORWARDED_FOR is if exists, otherwise it defaults to REMOTE_ADDR. The problem with this method is that HTTP_X_FORWARDED_FOR could be the same for many different computers on different networks. It should only be used in relation to REMOTE_ADDR.

So, this patch appends HTTP_X_FORWARDED_FOR to REMOTE_ADDR if it exists, rather than replacing it entirely. This also makes it easier to detect voting fraud, as HTTP_X_FORWARDED_FOR can be manipulated by the user and isn't entirely trustworthy.

CommentFileSizeAuthor
votingapi_hostname.patch980 bytesChrisKennedy

Comments

eaton’s picture

Status: Active » Fixed

Committed. Thanks!

Anonymous’s picture

What do I need to do to get this installed?

Anonymous’s picture

Status: Fixed » Closed (fixed)