-
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
SynonymAnalyzer.php in module-search is evaluating user input as a regex #25886
Comments
Hi @dan-ding. 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. @dan-ding do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
@magento this can't be shown on an instance as it requires elasticsearch |
Hi @engcom-Charlie. Thank you for working on this issue.
|
Hello @dan-ding Manual testing scenario:
Result: So i have to close this issue. |
@magento-engcom-team this was closed because it wasn't reproduced. However, incorrect steps were used so this should be reopened. The problem can be reproduced only when synonym exists for given phrase. So to reproduce:
Expected behavior would be search results page, either empty or one showing results. Current behavior is the exception:
|
Hi @dan-ding. Thank you for your report.
The fix will be available with the upcoming 2.4.2 release. |
Preconditions (*)
2.3.2-xyz
2.3-develop
prolly others
Steps to reproduce (*)
GET /catalogsearch/result/?q=http://www.a
Expected result (*)
Actual result (*)
The error that occurs is on line 96 of search/Model/SynonymAnalyzer.php:
magento2/app/code/Magento/Search/Model/SynonymAnalyzer.php
Line 96 in f6405d5
the error message:
report.ERROR: Warning: preg_match(): Unknown modifier '/' in /var/www/html/vendor/magento/module-search/Model/SynonymAnalyzer.php on line 96
preg_match is evaluating the user input as a regex
The text was updated successfully, but these errors were encountered: