Wrong production variation returned by CommerceWebformOrderHandler::loadEntityValue

Created on 10 October 2024, 6 months ago

Problem/Motivation

Do to the "fuzzy matching" of entity keys in \Drupal\commerce_webform_order\Plugin\WebformHandler\CommerceWebformOrderHandler::loadEntityValue
it's possible that the wrong product variation is loaded, for example when a UUID starts with the same numeric value as a product variation's variation_id.

Steps to reproduce

Difficult to reproduce, because it requires very specific collision of variation id and UUID , as well as unordered search results.

Proposed resolution

Don't fuzzy match ids when we have a specific identifier.

Remaining tasks

  • Write a test to demonstrate the bad behavior
  • Create a patch to fix it

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024