[wp-trac] [WordPress Trac] #4198: $_SERVER['REMOTE_ADDR'] is a bad environmental variable for some people

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 25 18:46:01 GMT 2007


#4198: $_SERVER['REMOTE_ADDR'] is a bad environmental variable for some people
----------------------------+-----------------------------------------------
 Reporter:  technosailor    |       Owner:  technosailor
     Type:  defect          |      Status:  new         
 Priority:  normal          |   Milestone:  2.2         
Component:  Administration  |     Version:              
 Severity:  normal          |    Keywords:              
----------------------------+-----------------------------------------------
 If a blog is behind a proxy/cache such as squid, the REMOTE_ADDR
 environmental variable is set to the IP of the proxy. Sometimes this
 causes problems with IP comment flooding functionality as an example, but
 also with some plugins that check IP addresses and portions of the core
 such as comment IP logging. Attached is a patch that checks for
 HTTP_X_FORWARDED_FOR which is the server variable that is set in PHP when
 a squid proxy is present. I put the function in pluggable as this variable
 _might_ be different for other proxies. I have no access to other proxies
 to test.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4198>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list