-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strlen() expects parameter 1 to be string, array given | magento/module-catalog-search #33589
Comments
Hi @Morgy93. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento give me 2.4-develop instance |
Hi @Morgy93. Thank you for your request. I'm working on Magento instance for you. |
Hi @Morgy93, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later. |
@magento give me 2.4-develop instance |
Hi @Morgy93. Thank you for your request. I'm working on Magento instance for you. |
Hi @Morgy93, here is your Magento Instance: https://52a58bd3ae67a73e5814b62433f13aee-2-4-develop.instances.magento-community.engineering |
Verified the issue on Magento 2.4-develop branch and the issue is reproducible:
|
Hi @engcom-November. Thank you for working on this issue.
|
Verified the issue on Magento 2.4-develop branch and the issue is reproducible: Magentoroot/var/log/exception.log: main.CRITICAL: Warning: strlen() expects parameter 1 to be string, array given in /var/www/html/magento2.4/magento2/app/code/Magento/CatalogSearch/Model/Advanced.php on line 380 {"report_id":"79cdf9e388c36ce3b8cc8d55f705fca8f8e6a566f6b8c18c11190cc9c4eb90d1","exception":"[object] (Exception(code: 0): Warning: strlen() expects parameter 1 to be string, array given in /var/www/html/magento2.4/magento2/app/code/Magento/CatalogSearch/Model/Advanced.php on line 380 at /var/www/html/magento2.4/magento2/lib/internal/Magento/Framework/App/ErrorHandler.php:61)"} [] |
✅ Confirmed by @engcom-November 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. |
@magento I am working on this |
Hello @Morgy93 cc @engcom-November cc @SilinMykola |
It triggers a 500 server error so it is an issue, isn't it? =) It was discovered while someone tried to hack into the system, so yes, it might not be "usual customer behavior", but still an (security) issue. |
@andrewbess for wrong Search requests like this, User should not be displayed with exception/unhandled errors. Error handling should be made for better user experience and to avoid security issues. |
I understand you @engcom-November @Morgy93 |
I think the validation of those parameters should be broadened a bit, currently it only validates if Just my 2 cents I'm not very familiar with this part in magento's codebase. |
Hi @Morgy93. Thank you for your report.
The fix will be available with the upcoming 2.4.4 release. |
Preconditions (*)
Steps to reproduce (*)
/catalogsearch/advanced/result/?price[from][]=1&price[to]=1
http://magento2.4.local/catalogsearch/advanced/result/?price[from][]=1&price[to]=1
Expected result (*)
It should not throw an unhandled error.
Actual result (*)
Issue 2: strpos() expects parameter 1 to be string, array given | magento/module-eav #33588
Steps to reproduce:
Input Type should be: Dropdown
Storefront Properties: Use in Search: Yes, Visible in Advanced Search: Yes
Ex: https://magento2.4.local/catalogsearch/advanced/result/?test_data[][error]=1
Issue: There has been an error processing your request Error message is getting displayed
Note: There is no issue with Text Attribute. URL is working for Text attribute. Issue is observed for dropdown attribute.
Magentoroot/var/log/exception.log:
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
The text was updated successfully, but these errors were encountered: