Security issue with the _formatted attribute ( highlight ) #167
TiagoJacobs
started this conversation in
Feedback & Feature Proposal
Replies: 1 comment 1 reply
-
Hello @TiagoJacobs 👋 For the moment we have chosen to let the sanitization work to the choice of the user on the client-side according to his use case. Here is an issue that will give more details about that choice. meilisearch/meilisearch#1409 It is possible that we will change this behavior later. I will move this issue to our product repository discussions space so that we can discuss this topic and other users can join and vote for the best proposals/messages 🗣 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
When you do a search and require to highlight the terms that matched, an HTML tag
<em>
is added.This force the applications to render the result from MailiSearch as HTML.
If a user insert a malicious HTML code, it will get executed.
MailiSearch should escape ( something similar to what php's htmlentities function does ).
Example:
Sample search: xuxu
Sample content:
Highlighted content ( from a malicious user ):
Expected highlighted content:
This means that web applications using the highlighted output will only evaluate tags generated by MeiliSearch.
Beta Was this translation helpful? Give feedback.
All reactions