Skip to content

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

Closed
@n2diving-dgx

Description

@n2diving-dgx

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.

Metadata

Metadata

Assignees

Labels

Component: SalesFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P3May be fixed according to the position in the backlog.Progress: doneReported on 2.1.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions