From f5e638b0b9ef919384a23d6f2cfe1ed23ff4374c Mon Sep 17 00:00:00 2001 From: Elizabeth Okerio Date: Tue, 2 Jul 2024 15:34:08 +0300 Subject: [PATCH] update MaxProtocolVersion --- src/Microsoft.AspNetCore.OData/Formatter/ODataInputFormatter.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Microsoft.AspNetCore.OData/Formatter/ODataInputFormatter.cs b/src/Microsoft.AspNetCore.OData/Formatter/ODataInputFormatter.cs index bea107117..c9b84b2ee 100644 --- a/src/Microsoft.AspNetCore.OData/Formatter/ODataInputFormatter.cs +++ b/src/Microsoft.AspNetCore.OData/Formatter/ODataInputFormatter.cs @@ -202,6 +202,7 @@ internal static async Task ReadFromStreamAsync( oDataReaderSettings.BaseUri = baseAddress; oDataReaderSettings.Validations = oDataReaderSettings.Validations & ~ValidationKinds.ThrowOnUndeclaredPropertyForNonOpenType; oDataReaderSettings.Version = version; + oDataReaderSettings.MaxProtocolVersion = version; IODataRequestMessage oDataRequestMessage = ODataMessageWrapperHelper.Create(new StreamWrapper(request.Body), request.Headers, request.GetODataContentIdMapping(), request.GetRouteServices());