Skip to content
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

Set values as html to table rows #48911

Merged
merged 3 commits into from
Oct 24, 2019
Merged

Set values as html to table rows #48911

merged 3 commits into from
Oct 24, 2019

Conversation

gospodarsky
Copy link

@gospodarsky gospodarsky commented Oct 22, 2019

Summary

Update: Has been reverted (#49306)

image

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@alexwizp
Copy link
Contributor

Fix regression of #43240

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kertal kertal self-requested a review October 22, 2019 20:45
@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, tested locally in Chrome

@elasticmachine
Copy link
Contributor

💔 Build Failed

@gospodarsky
Copy link
Author

Retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kertal
Copy link
Member

kertal commented Oct 24, 2019

dear @LeeDr could we merge this into 7.5, it's not critical but fixing 2 regressions?

@kertal
Copy link
Member

kertal commented Oct 24, 2019

We need to undo / or improve this! There are serious security concerns with this solution:

For instance, there could be an ES field containing: <img src="x" onerror="alert(1)">, this would lead to the following on IE11:

Bildschirmfoto 2019-10-24 um 11 04 44

Aside from this worst case any html stored in the ES record would be displayed

So we need to be sure / check that the html is generated by our code / formatters, then setting using dangerouslySetInnerHTML would be ok. However, it's never a good solution, so I think finishing #48728 should be preferred.

@timroes
Copy link
Contributor

timroes commented Oct 24, 2019

As @kertal mentioned: this needs to be reverted due to the introduced XSS attack. Please @Avinar-24 create a PR that reverts that change from master. So we need to wait for the actual save implementation @kertal is working on for fixing this actually.

Also that PR showed that we're missing the react/no-danger linting rule for TypeScript files. Will add that, so linting would have caught this.

timroes added a commit that referenced this pull request Oct 25, 2019
@timroes timroes added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:fix v7.6.0 labels Oct 25, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

timroes pushed a commit that referenced this pull request Oct 25, 2019
* Revert "Set values as html to table rows (#48911)"

This reverts commit 3fd9f91.

* Remove unrelated change from the revert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application regression release_note:skip Skip the PR/issue when compiling release notes v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants