Problem/Motivation

As earlier described here #764796: $_SERVER['REMOTE_ADDR'] incorrectly used when performing validation REMOTE_ADDR isn't working behind reverse proxies because it will always contain the ip of the proxy.

Proposed resolution

Use ip_address() which is created exactly for this purpose.

Remaining tasks

Review needed.

User interface changes

None.

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

This is already applied in the 7.x-1.x branch but not on the 2.x. Works fine as ip_address() is made for this.

hass’s picture

@Liam: When do you plan to commit this trivial bugfix?

  • hass committed e866580 on 7.x-2.x authored by das-peter
    Issue #2413381 by das-peter: Use ip_address() instead REMOTE_ADDR
    
hass’s picture

Status: Reviewed & tested by the community » Fixed

  • hass committed e866580 on 8.x-2.x authored by das-peter
    Issue #2413381 by das-peter: Use ip_address() instead REMOTE_ADDR
    

  • hass committed e866580 on 6.x-2.x authored by das-peter
    Issue #2413381 by das-peter: Use ip_address() instead REMOTE_ADDR
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.