Skip to content

Commit

Permalink
Make a copy of extra headers before modifying them (#226)
Browse files Browse the repository at this point in the history
* Make a copy of extra headers before modifying them
  • Loading branch information
jporkka authored and abatishchev committed Oct 5, 2019
1 parent 2de2bd0 commit 6d92258
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/JWT/JWT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<!-- Include PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>

<Version>5.3.0-beta2</Version>
<Version>5.3.1</Version>
<FileVersion>5.0.0.0</FileVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/JWT/JwtEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public string Encode(IDictionary<string, object> extraHeaders, object payload, b

var segments = new List<string>(3);

var header = extraHeaders is null ? new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) : extraHeaders;
var header = extraHeaders is null ? new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) : new Dictionary<string, object>(extraHeaders, StringComparer.OrdinalIgnoreCase);
header.Add("typ", "JWT");
header.Add("alg", _algorithm.Name);

Expand Down

0 comments on commit 6d92258

Please sign in to comment.