Skip to content

Commit 2ba00cc

Browse files
committed
1.5.1 release announcement
1 parent 719d5a4 commit 2ba00cc

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: "ReactJS.NET 1.5.1 - Security update"
3+
layout: post
4+
author: Daniel Lo Nigro
5+
---
6+
7+
I'm happy to announce the release of ReactJS.NET 1.5.1! This is a bug fix release and fixes a potential XSS issue with server-side rendering. JSON.NET does not escape HTML characters in its JSON output by default. As ReactJS.NET uses JSON.NET to output the props of server-side rendered components, a prop that accepts arbitrary user input could potentially contain script tags, allowing for XSS.
8+
9+
Escaping of HTML is now enabled by default. If you are using custom JSON serializer settings, you can enable HTML escaping by setting `StringEscapeHandling` to `StringEscapeHandling.EscapeHtml`:
10+
11+
```csharp
12+
ReactSiteConfiguration.Configuration.SetJsonSerializerSettings(
13+
new JsonSerializerSettings
14+
{
15+
StringEscapeHandling = StringEscapeHandling.EscapeHtml
16+
}
17+
);
18+
```
19+
20+
Have fun, and as always, please feel free to send feedback or bug reports
21+
[on GitHub](https://github.com/reactjs/React.NET).
22+
23+
— Daniel
24+
25+
*Thanks to [Li Huan Jeow](https://www.linkedin.com/in/huan086) for the report.*

0 commit comments

Comments
 (0)