-
Notifications
You must be signed in to change notification settings - Fork 2.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
StringLike field with quotes breaks out of title #3686
Comments
I realized that this issue lead to an XSS vulnerability, so I've published a security advisory: GHSA-8qgm-g2vv-vwvc Thank you for giving the valuable report 👍 |
@mshibuya thank you for your work on this! When trying 3.1.3 with this change I am seeing unescaped HTML tags in the title attribute. The field value does appear properly escaped -- it is the HTML from pretty_value in rails admin that is unescaped and no longer stripped out. For example on booleans:
Or associations:
|
@q3aiml So sorry for the issue, I messed up 🙇♂️ |
This reverts commit d84b398. Because it's causing a functional issue, as well as being unnecessary. Refs. #3686 (comment)
Released 3.1.4. Please give it a try, and if you see any issue please let me know 🙇♂️ |
Describe the bug
Storing content in a field that contains quotes results in only the content before the first quote is in the title. The rest of the content is stored in the tag as individual attributes.
We noticed this when the word
hidden
was stored after a quote, which resulted in the cell being hidden and the rest of the row shifting to the left.Reproduction steps
Example "text" hidden
in the field.Expected behavior
"
Additional context
rails
version: 7.1.3rails_admin
version: 3.0.0.beta2The text was updated successfully, but these errors were encountered: