Skip to content

Commit 719d5a4

Browse files
committed
Escape HTML in JSON output by default, to prevent potential XSS.
1 parent 90661fe commit 719d5a4

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

build.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ of patent rights can be found in the PATENTS file in the same directory.
1111
<PropertyGroup>
1212
<Major>1</Major>
1313
<Minor>5</Minor>
14-
<Build>0</Build>
14+
<Build>1</Build>
1515
<Revision>0</Revision>
1616
<DevNuGetServer>http://reactjs.net/packages/</DevNuGetServer>
1717
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\tools\MSBuildTasks</MSBuildCommunityTasksPath>

src/React.AspNet/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.5.0-*",
2+
"version": "1.5.1-*",
33
"configurations": {
44
"Debug": {
55
"compilationOptions": {

src/React.Core/ReactSiteConfiguration.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
using Newtonsoft.Json;
1111
using System.Collections.Generic;
12-
using System.Collections.ObjectModel;
1312
using System.Linq;
1413

1514
namespace React
@@ -38,6 +37,10 @@ public ReactSiteConfiguration()
3837
ReuseJavaScriptEngines = true;
3938
AllowMsieEngine = true;
4039
LoadReact = true;
40+
JsonSerializerSettings = new JsonSerializerSettings
41+
{
42+
StringEscapeHandling = StringEscapeHandling.EscapeHtml
43+
};
4144
}
4245

4346
/// <summary>

src/React.Sample.Mvc6/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
/* Click to learn more about project.json http://go.microsoft.com/fwlink/?LinkID=517074 */
33
"webroot": "wwwroot",
4-
"version": "1.5.0-*",
4+
"version": "1.5.1-*",
55
"dependencies": {
66
"Microsoft.AspNet.Mvc": "6.0.0.0-beta3",
77
"Microsoft.AspNet.Diagnostics": "1.0.0.0-beta3",

src/wrap/React.Core/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.5.0-*",
2+
"version": "1.5.1-*",
33
"frameworks": {
44
"net40": {
55
"wrappedProject": "../../React.Core/React.Core.csproj",

src/wrap/React/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.5.0-*",
2+
"version": "1.5.1-*",
33
"frameworks": {
44
"net40": {
55
"wrappedProject": "../../React.Core/React.Core.csproj",

src/wrap/VroomJs/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.5.0-*",
2+
"version": "1.5.1-*",
33
"frameworks": {
44
"net40": {
55
"bin": {

0 commit comments

Comments
 (0)