ACSD-64523: The REST endpoint [V1/import/csv] fails to validate mandatory fields…
The REST endpoint [V1/import/csv] fails to validate mandatory fields, allowing the creation of products without providing these required fields. Quality patch ACSD-64523 for magento/module-catalog applies to Magento Open Source and Adobe Commerce 2.4.5 to 2.4.8-p5.
- Categories
- Catalog/Product, Import/Export, Web API
- Components
- magento/module-catalog, magento/module-catalog-import-export
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.62
Issue
The REST endpoint [V1/import/csv] fails to validate mandatory fields, allowing the creation of products without providing these required fields.
Steps to reproduce
1. Execute the following payload (update the Authorization header): curl --location 'http://<domain>/rest/default/V1/import/json' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer xxxxx' \ --data '{ "source": { "locale": "en_AU", "entity": "catalog_product", "behavior": "append", "validation_strategy": "validation-stop-on-errors", "allowed_error_count": 0, "items": [ { "sku": "product_sku", "product_online": "no", "attribute_set_code": "Default", "product_type": "configurable", "product_websites": "base", "store_view_code": "default", "name": null, "description": null, "short_description": null, "weight": null, "tax_class_name": null, "visibility": null, "price": null, "url_key": null, "cost": null, "additional_attributes": { "special_price": "", "retail_price": "" }, "configurable_variations": [] } ] } }'
Adobe's page lists 2.4.7 - 2.4.7-p4 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.8.
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 ACSD-64523. On Cloud, add ACSD-64523 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-64523/ 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.7 <2.4.8
- Magento Open Source
- 2.4.7-p10, 2.4.7-p9, 2.4.7-p8, 2.4.7-p7, 2.4.7-p6, 2.4.7-p5, 2.4.7-p4, 2.4.7-p3, 2.4.7-p2, 2.4.7-p1, 2.4.7
- Adobe Commerce
- 2.4.7-p10, 2.4.7-p9, 2.4.7-p8, 2.4.7-p7, 2.4.7-p6, 2.4.7-p5, 2.4.7-p4, 2.4.7-p3, 2.4.7-p2, 2.4.7-p1, 2.4.7
- Patch file
- patches/os/ACSD-64523_2.4.7-p3.patch
- vendor/magento/module-catalog/Ui/Component/Listing/Columns/ProductActions.php
- vendor/magento/module-catalog/Ui/Component/Listing/Columns/Thumbnail.php
- vendor/magento/module-catalog-import-export/Model/Import/Product.php
- vendor/magento/module-catalog-import-export/Model/Import/Product/Type/AbstractType.php
- vendor/magento/module-catalog-import-export/Model/Import/Product/Validator.php
- vendor/magento/module-catalog-import-export/Model/Import/Product/Validator/AbstractImportValidator.php
- vendor/magento/module-catalog-import-export/Model/Import/Product/Validator/Name.php (added)
- vendor/magento/module-catalog-import-export/etc/di.xml
magento/magento2-base >=2.4.5 <2.4.7 || >=2.4.8 <2.4.9
- Magento Open Source
- 2.4.8-p5, 2.4.8-p4, 2.4.8-p3, 2.4.8-p2, 2.4.8-p1, 2.4.8, 2.4.6-p15, 2.4.6-p14, 2.4.6-p13, 2.4.6-p12, 2.4.6-p11, 2.4.6-p10, 2.4.6-p9, 2.4.6-p8, 2.4.6-p7, 2.4.6-p6, 2.4.6-p5, 2.4.6-p4, 2.4.6-p3, 2.4.6-p2, 2.4.6-p1, 2.4.6, 2.4.5-p17, 2.4.5-p16, 2.4.5-p15, 2.4.5-p14, 2.4.5-p13, 2.4.5-p12, 2.4.5-p11, 2.4.5-p10, 2.4.5-p9, 2.4.5-p8, 2.4.5-p7, 2.4.5-p6, 2.4.5-p5, 2.4.5-p4, 2.4.5-p3, 2.4.5-p2, 2.4.5-p1, 2.4.5
- Adobe Commerce
- 2.4.8-p5, 2.4.8-p4, 2.4.8-p3, 2.4.8-p2, 2.4.8-p1, 2.4.8, 2.4.6-p15, 2.4.6-p14, 2.4.6-p13, 2.4.6-p12, 2.4.6-p11, 2.4.6-p10, 2.4.6-p9, 2.4.6-p8, 2.4.6-p7, 2.4.6-p6, 2.4.6-p5, 2.4.6-p4, 2.4.6-p3, 2.4.6-p2, 2.4.6-p1, 2.4.6, 2.4.5-p17, 2.4.5-p16, 2.4.5-p15, 2.4.5-p14, 2.4.5-p13, 2.4.5-p12, 2.4.5-p11, 2.4.5-p10, 2.4.5-p9, 2.4.5-p8, 2.4.5-p7, 2.4.5-p6, 2.4.5-p5, 2.4.5-p4, 2.4.5-p3, 2.4.5-p2, 2.4.5-p1, 2.4.5
- Patch file
- patches/os/ACSD-67229_2.4.6-p12.patch
- vendor/magento/module-catalog-import-export/Model/Import/Product/Validator/Backorders.php (added)
- vendor/magento/module-catalog-import-export/etc/di.xml
