We need to use invariant culture when doing ToString of user ints
This commit is contained in:
Bjarke Berg
2022-05-23 08:19:59 +02:00
committed by GitHub
parent 2126696559
commit 8d2fb538fd

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading.Tasks;
@@ -68,7 +69,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
[HttpGet]
public async Task<ActionResult<IEnumerable<UserTwoFactorProviderModel>>> Get2FAProvidersForUser(int userId)
{
var user = await _backOfficeUserManager.FindByIdAsync(userId.ToString());
var user = await _backOfficeUserManager.FindByIdAsync(userId.ToString(CultureInfo.InvariantCulture));
var enabledProviderNameHashSet = new HashSet<string>(await _twoFactorLoginService.GetEnabledTwoFactorProviderNamesAsync(user.Key));