From 2755661de559499f2dcbbc3d88b02a1ffca21747 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Fri, 25 Sep 2020 00:00:24 -0700 Subject: [PATCH] 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. --- src/Workspaces/Remote/Core/ServiceDescriptor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Workspaces/Remote/Core/ServiceDescriptor.cs b/src/Workspaces/Remote/Core/ServiceDescriptor.cs index 68d4d25e8e5..a53014d0b04 100644 --- a/src/Workspaces/Remote/Core/ServiceDescriptor.cs +++ b/src/Workspaces/Remote/Core/ServiceDescriptor.cs @@ -58,7 +58,7 @@ protected override IJsonRpcMessageFormatter CreateFormatter() => ConfigureFormatter((MessagePackFormatter)base.CreateFormatter()); private static readonly MessagePackSerializerOptions s_options = StandardResolverAllowPrivate.Options - .WithSecurity(MessagePackSecurity.UntrustedData) + .WithSecurity(MessagePackSecurity.UntrustedData.WithHashCollisionResistant(false)) .WithResolver(CompositeResolver.Create( MessagePackFormatters.GetFormatters(), new IFormatterResolver[] { ImmutableCollectionMessagePackResolver.Instance, StandardResolverAllowPrivate.Instance })); -- GitLab