Skip to content

Commit 231485e

Browse files
author
support
committed
Merge branch 'develop' of https://github.com/grandnode/grandnode2 into develop
2 parents bad5025 + 6a1b29c commit 231485e

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎Directory.Packages.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageVersion Include="Microsoft.OpenApi" Version="2.12.2" />
1414
<PackageVersion Include="Scalar.AspNetCore" Version="2.17.13" />
1515
<PackageVersion Include="PdfPig" Version="0.1.16" />
16-
<PackageVersion Include="MailKit" Version="4.18.1" />
16+
<PackageVersion Include="MailKit" Version="4.18.2" />
1717
<PackageVersion Include="AWSSDK.Core" Version="4.0.102.8" />
1818
<PackageVersion Include="AWSSDK.S3" Version="4.0.104.1" />
1919
<PackageVersion Include="Azure.Storage.Blobs" Version="12.30.0" />

‎src/Tests/Grand.Web.Common.Tests/Security/Oidc/OidcProfileSynchronizerTests.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public async Task Email_TakenByOther_Kept()
134134
VerifyEmail("new@shop.com", Times.Never());
135135
Assert.AreEqual("old@shop.com", _customer.Email);
136136
_logger.Verify(x => x.Log(LogLevel.Warning, It.IsAny<EventId>(),
137-
It.Is<It.IsAnyType>((v, _) => v.ToString()!.Contains("keeps old@shop.com") && v.ToString()!.Contains("customer c2")),
137+
It.Is<It.IsAnyType>((v, _) => v.ToString()!.Contains("customer c2") && !v.ToString()!.Contains("@shop.com")),
138138
It.IsAny<Exception>(), It.IsAny<Func<It.IsAnyType, Exception, string>>()), Times.Once);
139139
}
140140

‎src/Web/Grand.Web.Common/Security/Oidc/OidcProfileSynchronizer.cs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,25 @@ private async Task SyncEmail(Customer customer, ExternalRegistrationIdentity ide
5050
//emergency access
5151
if (loginConfig.IsBreakGlass(customer.Email))
5252
{
53-
logger.LogWarning("OpenID Connect profile sync: break-glass customer {CustomerId} keeps {OldEmail} " +
54-
"(the identity provider has {NewEmail})", customer.Id, customer.Email, newEmail);
53+
logger.LogWarning("OpenID Connect profile sync: break-glass customer {CustomerId} keeps its e-mail " +
54+
"(the identity provider has a different one)", customer.Id);
5555
return;
5656
}
5757

5858
//nor may an account take an address listed there: the password it still has would open the Admin login page
5959
//and keep it signed in past the provider
6060
if (loginConfig.IsBreakGlass(newEmail))
6161
{
62-
logger.LogWarning("OpenID Connect profile sync: customer {CustomerId} keeps {OldEmail}: {NewEmail} is a " +
63-
"break-glass address", customer.Id, customer.Email, newEmail);
62+
logger.LogWarning("OpenID Connect profile sync: customer {CustomerId} keeps its e-mail: the identity " +
63+
"provider's one is a break-glass address", customer.Id);
6464
return;
6565
}
6666

6767
var owner = await customerService.GetCustomerByEmail(newEmail, customerConfig.RegisterCustomersPerStore ? storeId : "");
6868
if (owner != null && owner.Id != customer.Id)
6969
{
70-
logger.LogWarning("OpenID Connect profile sync: customer {CustomerId} keeps {OldEmail}: {NewEmail} belongs to customer {OtherId}",
71-
customer.Id, customer.Email, newEmail, owner.Id);
70+
logger.LogWarning("OpenID Connect profile sync: customer {CustomerId} keeps its e-mail: the identity " +
71+
"provider's one belongs to customer {OtherId}", customer.Id, owner.Id);
7272
return;
7373
}
7474

0 commit comments

Comments
 (0)