ACP2E-4156: In the REST API, shipping address validation does not honor the customer address…
In the REST API, shipping address validation does not honor the customer address attribute settings configured in Admin. Quality patch ACP2E-4156 for magento/module-checkout applies to Magento Open Source and Adobe Commerce 2.4.8 to 2.4.8-p4.
- Categories
- Shipping, Web API
- Components
- magento/module-checkout, magento/module-eav
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.80
Issue
In the REST API, shipping address validation does not honor the customer address attribute settings configured in Admin.
Steps to reproduce
1. Go to Stores > Attributes > Customer Address in the Admin panel. 1. Open the attribute with the attribute code firstname. 1. Under Attribute Properties, set: 1. Input Validation: Length Only. 1. Minimum Text Length: 1. 1. Maximum Text Length: 20. 1. Go to the storefront and add the test product to the cart. 1. Send a REST API request to /rest/default/V1/guest-carts/cartId/shipping-information to add or update shipping information with a firstname value longer than 20 characters.
Adobe's page lists 2.4.8 - 2.4.8-p5 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.
Adobe scheduled the permanent fix for 2.4.9.
Install
Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACP2E-4156. On Cloud, add ACP2E-4156 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACP2E-4156/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.
Patch files and compatible versions
magento/magento2-base >=2.4.8 <2.4.8-p5
- Patch file
- patches/os/ACP2E-4812_2.4.8-p4.patch
- vendor/magento/module-checkout/Model/GuestShippingInformationManagement.php
- vendor/magento/module-checkout/i18n/en_US.csv
- vendor/magento/module-eav/Model/Attribute/Data/Date.php
- vendor/magento/module-eav/Model/Attribute/Data/File.php
- vendor/magento/module-eav/Model/Attribute/Data/Multiline.php
- vendor/magento/module-eav/Model/Attribute/Data/Multiselect.php
- vendor/magento/module-eav/Model/Attribute/Data/Select.php
- vendor/magento/module-eav/Model/Attribute/Data/Text.php
