Skip to content

Commit 9dae120

Browse files
Update Base64 decoding method in Diagnostics ViewModel
Switch from `Base64Url.Decode` to `Base64Url.DecodeFromChars` for improved decoding logic in diagnostics processing.
1 parent 6d6b20a commit 9dae120

File tree

1 file changed

+2
-2
lines changed
  • IdentityServer/v7/AspNetIdentityPasskeys/IdentityServerAspNetIdentityPasskeys/Pages/Diagnostics

1 file changed

+2
-2
lines changed

IdentityServer/v7/AspNetIdentityPasskeys/IdentityServerAspNetIdentityPasskeys/Pages/Diagnostics/ViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright (c) Duende Software. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4+
using System.Buffers.Text;
45
using System.Text;
56
using System.Text.Json;
6-
using Duende.IdentityModel;
77
using Microsoft.AspNetCore.Authentication;
88

99
namespace IdentityServerAspNetIdentityPasskeys.Pages.Diagnostics;
@@ -18,7 +18,7 @@ public ViewModel(AuthenticateResult result)
1818
{
1919
if (encoded != null)
2020
{
21-
var bytes = Base64Url.Decode(encoded);
21+
var bytes = Base64Url.DecodeFromChars(encoded);
2222
var value = Encoding.UTF8.GetString(bytes);
2323
Clients = JsonSerializer.Deserialize<string[]>(value) ?? Enumerable.Empty<string>();
2424
return;

0 commit comments

Comments
 (0)