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

IPv6 values of X_FORWARDED_FOR in sales orders are truncated to 32 characters. #28693

Closed
n2diving-dgx opened this issue Jun 11, 2020 · 7 comments · Fixed by #27221
Closed

IPv6 values of X_FORWARDED_FOR in sales orders are truncated to 32 characters. #28693

n2diving-dgx opened this issue Jun 11, 2020 · 7 comments · Fixed by #27221
Assignees
Labels
Component: Sales Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.1.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@n2diving-dgx
Copy link

n2diving-dgx commented Jun 11, 2020

Preconditions (*)

  1. Magento 2.4-develop
  2. When customer is using IPV6 address, the x_forwarded_for IP might get saved only partially into sales_order and quote tables depending on the address str length. Problem appears to be in the x_forwarded_for column length which currently is VARCHAR(32)
  3. This seems to be a version of the error descripted in REMOTE_IP gets saved partially when using IPV6 #10395 for REMOTE_IP
  4. Known to exist in our version 2.3.5-p1 but I suspect it probably pre-exists all the way back to at least 2.1.x

Steps to reproduce (*)

1.Customer creates order from an IPv6 address that is longer than 32 characters when
IPv6 addresses can be up to 45 characters.

Expected result (*)

  1. Veiw order for Placed from IP 2600:1700:ec11:1a40:f829:8829:139c:d85f (2600:1700:ec11:1a40:f829:8829:139c:d85f)

Actual result (*)

  1. Placed from IP 2600:1700:ec11:1a40:f829:8829:139c:d85f (2600:1700:ec11:1a40:f829:8829:13)
  2. Note the truncated value in () is 32 characters long.

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • [ S1] Severity: S1 _- A recently installed fraud detection tool used for analyzing the order is detecting that the actual IP and the forwarded IP don't match, and further their API is throwing an error because the forwarded IPv6 value is malformed and thus invalid. Since nearly a third of the traffic coming to our website is IPv6, this issue is hindering our ability to detect fraudulent orders.
@m2-assistant
Copy link

m2-assistant bot commented Jun 11, 2020

Hi @n2diving-dgx. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


@ghost ghost added this to Ready for QA in Community Backlog Jun 11, 2020
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jun 11, 2020
@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Jun 17, 2020

Should be fixed by #27221 that isn't merged yet

@ihor-sviziev ihor-sviziev linked a pull request Jun 17, 2020 that will close this issue
4 tasks
@n2diving-dgx
Copy link
Author

#27221 fixes 2.4, but we are going to be on 2.3.x for a while, could we get a backport?

@engcom-Delta engcom-Delta self-assigned this Jul 10, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jul 10, 2020

Hi @engcom-Delta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Delta engcom-Delta added Component: Sales Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jul 10, 2020
@ghost ghost unassigned engcom-Delta Jul 10, 2020
@ghost ghost moved this from Ready for QA to Ready for Dev in Community Backlog Jul 10, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Delta
Thank you for verifying the issue. Based on the provided information internal tickets MC-35787 were created

Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jul 10, 2020
@sdzhepa sdzhepa added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Jul 14, 2020
@VladimirZaets VladimirZaets moved this from Ready for Dev to PR In Progress in Community Backlog Jul 21, 2020
@VladimirZaets VladimirZaets added the Priority: P3 May be fixed according to the position in the backlog. label Jul 21, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jul 21, 2020

Hi @ihor-sviziev. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

    1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

@ghost ghost moved this from PR In Progress to Dev in Progress in Community Backlog Jul 21, 2020
@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Jul 23, 2020
@magento-engcom-team
Copy link
Contributor

Hi @n2diving-dgx. Thank you for your report.
The issue has been fixed in #27221 by @ihor-sviziev in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.1 release.

@ghost ghost moved this from Dev in Progress to Done (last 30 days) in Community Backlog Jul 23, 2020
@magento-engcom-team magento-engcom-team added the Reported on 2.1.x Indicates original Magento version for the Issue report. label Nov 13, 2020
@m2-community-project m2-community-project bot removed this from Done (last 30 days) in Community Backlog Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Sales Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.1.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Development

Successfully merging a pull request may close this issue.

6 participants