Skip to content
This repository was archived by the owner on Jul 2, 2020. It is now read-only.

Update class.submit.php - user IP problem issue [amimoto-ami#2]#17

Open
qasimk2 wants to merge 1 commit intoamimoto-ami:masterfrom
qasimk2:patch-1
Open

Update class.submit.php - user IP problem issue [amimoto-ami#2]#17
qasimk2 wants to merge 1 commit intoamimoto-ami:masterfrom
qasimk2:patch-1

Conversation

@qasimk2
Copy link
Copy Markdown

@qasimk2 qasimk2 commented Feb 11, 2019

Solves the user IP problem issue [#2].

'REMOTE_ADDR' is populated each time but holds the server address. 'HTTP_X_FORWARDED_FOR' holds the client address.

The foreach loop at line 165 finds the REMOTE_ADDR and the quits the loop therefore 'HTTP_X_FORWARDED_FOR' is never sent.

This has been tested and is working in production for us.

Qasim
onewood.co

Q A
Bug fix? Yes
New feature? No
Issues addressed (#s or URLs) [#2]
BC breaks?
Deprecations?
Your wordpress.org's username

Description:

Steps to test this PR:

  1. Get current IP address from whatsmyip.com
  2. Go to WP installation with CF7-Mautic
  3. Submit a new form
  4. Check for the location in Mautic to see if it matches the location of the IP in step 1

Steps to reproduce the bug:

List deprecations along with the new alternative:

List backwards compatibility breaks:

Solves the user IP problem  issue [amimoto-ami#2]. 

'REMOTE_ADDR' is populated each time but holds the server address. 'HTTP_X_FORWARDED_FOR' holds the client address. 

The foreach loop at line 165 finds the REMOTE_ADDR and the quits the loop therefore 'HTTP_X_FORWARDED_FOR' is never sent. 

This has been tested and is working in production for us. 

Qasim
onewood.co
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant