Open wubinworks opened 1 week ago
Hi @wubinworks. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.
@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Bravo. 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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hi @wubinworks,
Thanks for your reporting and collaboration.
We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.
Customer input got parsed in Address Book and also in Customer view in admin.
But it is working fine in Admin side addresses
Hence Confirming the issue.
Thanks.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-13341 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Preconditions and environment
User input value such as
{{var firstname}}
is parsed in Address Book.Steps to reproduce
\ Magento 2.4.7 + use the system default HTML Address Template Company:
{{if city}}{{var city}}, {{/if}}
Street Address(street1):{{var firstname}}{{var lastname}}{{var country}}
\ \ \ \ \ \Expected result
The displayed address should be what the customer input.
{{something}}
should not be parsed.Actual result
Customer input got parsed.
Additional information
The cause is this line Template.php#L317.
str_replace
is dangerous when you don't know what will be replaced, how many times the original string will be modified. The best way is to sanitize the user input. The "deferred directives" may not be reliable because you still cannot control the user input value.Release note
No response
Triage and priority