-
Notifications
You must be signed in to change notification settings - Fork 23k
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
[FW][FIX] mail: traceback when searching single quotes or round brackets #165293
Conversation
@Atovange @alexkuhn cherrypicking of pull request #164320 failed. stdout:
stderr:
Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?). In the former case, you may want to edit this PR message as well. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
9632b40
to
2e413c6
Compare
Before this commit, when trying to highlight a message containing a single quote you get a traceback. To reproduce: - post a message with body "can't" - search for "can" - search for "can't" This happens because the XPath expression with unescaped single quotes becomes invalid. This commit fixes the issue by escaping the single quotes using the XPath concat() function. --- [FIX] mail: escaping search term for regexps Before this commit, trying to search for a message containing a round bracket would produce a traceback. - search for the string "(" This happens because the search term is not being escaped for the regexp. This commit fixes the issue by escaping the search term. Same is being done on the mock server. Added tests. Forward-Port-Of: odoo#164320 closes odoo#164320 X-original-commit: 61aa7c3
2e413c6
to
cd1d549
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robodoo r+
@alexkuhn you may want to rebuild or fix this PR as it has failed CI. |
@robodoo override=ci/security This is just added comment on a side-effect of |
Before this commit, when trying to highlight a message containing a single quote you get a traceback. To reproduce: - post a message with body "can't" - search for "can" - search for "can't" This happens because the XPath expression with unescaped single quotes becomes invalid. This commit fixes the issue by escaping the single quotes using the XPath concat() function. --- [FIX] mail: escaping search term for regexps Before this commit, trying to search for a message containing a round bracket would produce a traceback. - search for the string "(" This happens because the search term is not being escaped for the regexp. This commit fixes the issue by escaping the search term. Same is being done on the mock server. Added tests. Forward-Port-Of: #164320 closes #164320 closes #165293 X-original-commit: 61aa7c3 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when trying to highlight a message containing a single quote you get a traceback. To reproduce: - post a message with body "can't" - search for "can" - search for "can't" This happens because the XPath expression with unescaped single quotes becomes invalid. This commit fixes the issue by escaping the single quotes using the XPath concat() function. --- [FIX] mail: escaping search term for regexps Before this commit, trying to search for a message containing a round bracket would produce a traceback. - search for the string "(" This happens because the search term is not being escaped for the regexp. This commit fixes the issue by escaping the search term. Same is being done on the mock server. Added tests. Forward-Port-Of: odoo#164320 closes odoo#164320 closes odoo#165293 X-original-commit: 61aa7c3 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when trying to highlight a message containing a single quote you get a traceback. To reproduce: - post a message with body "can't" - search for "can" - search for "can't" This happens because the XPath expression with unescaped single quotes becomes invalid. This commit fixes the issue by escaping the single quotes using the XPath concat() function. --- [FIX] mail: escaping search term for regexps Before this commit, trying to search for a message containing a round bracket would produce a traceback. - search for the string "(" This happens because the search term is not being escaped for the regexp. This commit fixes the issue by escaping the search term. Same is being done on the mock server. Added tests. Forward-Port-Of: odoo#164320 closes odoo#164320 closes odoo#165293 X-original-commit: 61aa7c3 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when trying to highlight a message containing a single quote you get a traceback.
To reproduce:
This happens because the XPath expression with unescaped single quotes becomes invalid.
This commit fixes the issue by escaping the single quotes using the XPath concat() function.
Before this commit, trying to search for a message containing a round bracket would produce a traceback.
This happens because the search term is not being escaped for the regexp.
This commit fixes the issue by escaping the search term. Same is being done on the mock server. Added tests.
Forward-Port-Of: #165121
Forward-Port-Of: #164320