Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrderDetailsController should use Tools::getRemoteAddr() function instead of instead of $_SERVER['REMOTE_ADDR'] #8709

Merged
merged 1 commit into from Jan 29, 2018

Conversation

infiniweb
Copy link

@infiniweb infiniweb commented Jan 28, 2018

A CustomerMessage is created in the postProcess() function of OrderDetailsController.
The message is taking the client IP address which was retrieved with $_SERVER['REMOTE_ADDR'] instead of using Tools::getRemoteAddr().
This can lead to the incorrect value of the IP address (eg: when using a proxy).

Questions Answers
Branch? develop
Description? Usage of Tools::getRemoteAddr() in OrderDetailsController
Type? improvement
Category? CO
BC breaks? no
Deprecations? no
How to test? Submit a message in an Order

This change is Reviewable

@prestonBot
Copy link
Collaborator

Hello infiniweb!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

@Quetzacoalt91 Quetzacoalt91 merged commit 092062b into PrestaShop:develop Jan 29, 2018
@eternoendless eternoendless added this to the 1.7.4.0 milestone Apr 13, 2018
@eternoendless eternoendless changed the title CO: OrderDetailsController should use Tools::getRemoteAddr() function instead of instead of $_SERVER['REMOTE_ADDR'] OrderDetailsController should use Tools::getRemoteAddr() function instead of instead of $_SERVER['REMOTE_ADDR'] Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants