Merge pull request #255 from anuraghazra/xss-fix

fix: xss vulnerability on renderError
This commit is contained in:
Anurag Hazra 2020-07-29 19:06:57 +05:30 committed by GitHub
commit 34b5dcb181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ const renderError = (message, secondaryMessage = "") => {
<rect x="0.5" y="0.5" width="494" height="99%" rx="4.5" fill="#FFFEFE" stroke="#E4E2E2"/>
<text x="25" y="45" class="text">Something went wrong! file an issue at https://git.io/JJmN9</text>
<text data-testid="message" x="25" y="55" class="text small">
<tspan x="25" dy="18">${message}</tspan>
<tspan x="25" dy="18">${encodeHTML(message)}</tspan>
<tspan x="25" dy="18" class="gray">${secondaryMessage}</tspan>
</text>
</svg>