magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.44k stars 9.29k forks source link

[Issue] avoid a misconfiguration infinite loop #38822

Open m2-assistant[bot] opened 2 months ago

m2-assistant[bot] commented 2 months ago

This issue is automatically created based on existing pull request: magento/magento2#38794: avoid a misconfiguration infinite loop


Description (*)

The virtual type configurations, in di.xml files, are not supposed to be self‑referential, … but if they ever are this function will spin in an infinite loop.

Changes

Added a test to avoid a self‑referential mapping, returning the self‑reference instead of endlessly spinning.

Fixed Issues (if relevant)

unknown

Manual testing scenarios (*)

Configure a di.xml <virtualType …> node to be self‑referential (i.e. not actually virtual). This will cause the app to spin, infinitely, on the dereferencing attempt. Note that the self‑reference can be from a chain of <virtualType …> nodes and not just a single node.

Contribution checklist (*)

m2-assistant[bot] commented 2 months ago

Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-November commented 2 months ago

Hello @ergohack,

Thank you for the report and collaboration!

Going through the pr changes this issue can be confirmed.

github-jira-sync-bot commented 2 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12127 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 months ago

:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.