Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly using ASCII instead of UTF8 when converting message body to byte[] #1825

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyVersion>1.5.1</AssemblyVersion>
<AssemblyVersion>1.5.2</AssemblyVersion>
<TargetFramework>netstandard2.0</TargetFramework>

<!--This assembly needs to access internal methods inside the Amazon.Lambda.Annotations assembly.
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
try
{
// convert string to stream
var byteArray = Encoding.ASCII.GetBytes(__request__.Body);
var byteArray = Encoding.UTF8.GetBytes(__request__.Body);
var stream = new MemoryStream(byteArray);
<#= parameter.Name #> = serializer.Deserialize<<#= parameter.Type.FullName #>>(stream);
}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/src/Amazon.Lambda.Annotations.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Amazon.Lambda.Annotations</id>
<version>1.5.1</version>
<version>1.5.2</version>
<authors>Amazon Web Services</authors>
<tags>AWS Amazon Lambda</tags>
<description>Annotations that can be added to Lambda projects to generate C# code and CloudFormation templates. This library is currently in dev preview.</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyVersion>1.5.1</AssemblyVersion>
<AssemblyVersion>1.5.2</AssemblyVersion>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyResponse Subtract(
try
{
// convert string to stream
var byteArray = Encoding.ASCII.GetBytes(__request__.Body);
var byteArray = Encoding.UTF8.GetBytes(__request__.Body);
var stream = new MemoryStream(byteArray);
complexNumbers = serializer.Deserialize<System.Collections.Generic.IList<System.Collections.Generic.IList<int>>>(stream);
}
Expand Down Expand Up @@ -98,7 +98,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static void SetExecutionEnvironment()
envValue.Append($"{Environment.GetEnvironmentVariable(envName)}_");
}

envValue.Append("lib/amazon-lambda-annotations#1.5.1.0");
envValue.Append("lib/amazon-lambda-annotations#1.5.2.0");

Environment.SetEnvironmentVariable(envName, envValue.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"TestServerlessAppComplexCalculatorAddGenerated": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"TestServerlessAppCustomizeResponseExamplesOkResponseWithHeaderGenerated": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"TestServerlessAppDynamicExampleDynamicReturnGenerated": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"GreeterSayHello": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"GreeterSayHello": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).
Description: This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).
Resources:
TestServerlessAppIntrinsicExampleHasIntrinsicGenerated:
Type: AWS::Serverless::Function
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"TestServerlessAppNET8FunctionsToUpperGenerated": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"TestServerlessAppNullableReferenceTypeExampleNullableHeaderHttpApiGenerated": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"TestServerlessAppParameterlessMethodsNoParameterGenerated": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"TestServerlessAppParameterlessMethodWithResponseNoParameterWithResponseGenerated": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"SimpleCalculatorAdd": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"TestExecutableServerlessAppSourceGenerationSerializationExampleGetPersonGenerated": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"TestServerlessAppSQSEventExamplesValidSQSEventsProcessMessagesGenerated": {
"Type": "AWS::Serverless::Function",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.1.0).",
"Description": "This template is partially managed by Amazon.Lambda.Annotations (v1.5.2.0).",
"Resources": {
"ToUpper": {
"Type": "AWS::Serverless::Function",
Expand Down
Loading
Loading