提交 2755661d 编写于 作者: S Sam Harwell

Disable hash collision resistance for user data

MessagePack is not able to deserialize SuccessfulConflictResolution with
a collision resistant equality comparer due to the use of DocumentId as
a dictionary key.
上级 de348c5a
...@@ -58,7 +58,7 @@ protected override IJsonRpcMessageFormatter CreateFormatter() ...@@ -58,7 +58,7 @@ protected override IJsonRpcMessageFormatter CreateFormatter()
=> ConfigureFormatter((MessagePackFormatter)base.CreateFormatter()); => ConfigureFormatter((MessagePackFormatter)base.CreateFormatter());
private static readonly MessagePackSerializerOptions s_options = StandardResolverAllowPrivate.Options private static readonly MessagePackSerializerOptions s_options = StandardResolverAllowPrivate.Options
.WithSecurity(MessagePackSecurity.UntrustedData) .WithSecurity(MessagePackSecurity.UntrustedData.WithHashCollisionResistant(false))
.WithResolver(CompositeResolver.Create( .WithResolver(CompositeResolver.Create(
MessagePackFormatters.GetFormatters(), MessagePackFormatters.GetFormatters(),
new IFormatterResolver[] { ImmutableCollectionMessagePackResolver.Instance, StandardResolverAllowPrivate.Instance })); new IFormatterResolver[] { ImmutableCollectionMessagePackResolver.Instance, StandardResolverAllowPrivate.Instance }));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册