ACSD-67941: GraphQL requests with unknown filter names cause PHP exception logs
The ACSD-67941 patch fixes the issue where GraphQL requests with unknown filter names cause PHP exception logs. This patch is available when the Quality Patches Tool (QPT) 1.1.72 is installed. The patch ID is ACSD-67941. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.7-p7
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.7-p1 - 2.4.7-p7
magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
GraphQL requests that include unknown filter names trigger PHP exception logs.
Steps to reproduce:
- Send GraphQL request with unknown/incorrect filter name:
query Test($filter: FindFilterType){ cmsBlocks(identifiers:["home"]) { items { title } } }
Expected results:
A 4XX response code is returned when it’s impossible to parse the request, the request is not authorized, or there is another general problem with the request. If the request is parsed and can be processed, a 200 response code should be returned.
Actual results:
Internal server error returned in response with the following error in exception.log:
report.CRITICAL: LogicException: Config element "FindFilterType" is not declared in GraphQL schema in /test/lib/internal/Magento/Framework/GraphQl/Config.php:57
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide.