fix(security): treat messages as text, not HTML (#38062)

This commit is contained in:
Oliver Eyton-Williams
2020-01-13 10:56:29 +01:00
committed by Ahmad Abdolsaheb
parent 978bae6716
commit bb5a9e8153

View File

@ -11,7 +11,7 @@ function Flash({ flashMessage, onClose }) {
<TransitionGroup>
<CSSTransition classNames='flash-message' key={id} timeout={500}>
<Alert bsStyle={type} className='flash-message' onDismiss={onClose}>
<div dangerouslySetInnerHTML={{ __html: message }} />
{message}
</Alert>
</CSSTransition>
</TransitionGroup>