Closed
Description
Developer branch used
Preconditions
- This scenario i quiet difficult to reproduce since $_SERVER['HTTP_X_FORWARDED_FOR'] must be available.
Steps to reproduce
- Place any order
Expected result
- "x_forwarded_for" field must contain that value from $_SERVER['HTTP_X_FORWARDED_FOR']
Actual result
- "x_forwarded_for" field is always empty
Thoughts
I've tried to find out why it happens.
I found that this field is never set directly to order. It could be copied from quote during conversion quote to order. However quote does't have such field in DB. The field is set to quote each time the quote is got from checkout session.
https://github.com/magento/magento2/blob/develop/app/code/Magento/Checkout/Model/Session.php#L280
But on order placement process quote is got not from session but from DB.
https://github.com/magento/magento2/blob/develop/app/code/Magento/Quote/Model/QuoteManagement.php#L325
Metadata
Metadata
Assignees
Labels
Distributed Contribution DayThe issue has been fixed in 2.3 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release