Closed (fixed)
Project:
Mollom
Version:
5.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2008 at 17:10 UTC
Updated:
21 Jan 2009 at 19:14 UTC
Using Mollom with a Drupal 5.x server that is after a proxy server (load balancer o squid server) doesn't use the real ip source from a possible spammer.
In the 5.x-1.x version, the function _mollom_ip_address does not consider the existence of the X-Forwarded-For variable as in Drupal 6.x that use the ip_address() API function.
Comments
Comment #1
moshe weitzman commentedThis is really a limitation of D5 core as well. You might want to simply hack mollom_ip_address() or upgrade to d6.
Comment #2
jcmarco commentedComment #3
patrickfgoddard commentedI was having this issue too: Mollom entries in logs were only showing load balancer IP.
My "hack" is to cut and paste ip_address function from D6: http://api.drupal.org/api/function/ip_address/6 to replace the guts of _mollum_ip_address()
This is the result of trying to figure out why a legitimate (anonymous) comment got marked as spam (thus the user unable to post anything.) I'm hoping modifying the above function is a step in right direction.
EDIT:
On second pass, I had to manually add $reverse_proxy and $reverse_proxy_addresses (since in D6 has this option in settings.php file).
So here is my hacked function: