Adds comment about the security of TypeNameHandling.All
This commit is contained in:
parent
3fc4bee7e2
commit
32998b9e3c
|
|
@ -3595,6 +3595,10 @@ namespace Microsoft.AspNetCore.SignalR.Tests
|
||||||
{
|
{
|
||||||
PayloadSerializerSettings = new JsonSerializerSettings()
|
PayloadSerializerSettings = new JsonSerializerSettings()
|
||||||
{
|
{
|
||||||
|
// The usage of TypeNameHandling.All is a security risk.
|
||||||
|
// If you're implementing this in your own application instead use your own 'type' field and a custom JsonConverter
|
||||||
|
// or ensure you're restricting to only known types with a custom SerializationBinder like we are here.
|
||||||
|
// See https://github.com/aspnet/AspNetCore/issues/11495#issuecomment-505047422
|
||||||
TypeNameHandling = TypeNameHandling.All,
|
TypeNameHandling = TypeNameHandling.All,
|
||||||
SerializationBinder = StreamingHub.DerivedParameterKnownTypesBinder.Instance
|
SerializationBinder = StreamingHub.DerivedParameterKnownTypesBinder.Instance
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue