From 58e6a1dc28cb6afb1faf363ad784b28eee308e87 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 23 May 2023 06:00:32 +0000 Subject: [PATCH 01/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 30 +++++++++++++++--------------- eng/Versions.props | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/NuGet.config b/NuGet.config index 0a5c13c4361a..dce3b54de8a2 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1fe89a302f9c..d9f1015ade7f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -131,7 +131,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://github.com/dotnet/runtime @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -191,7 +191,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -219,7 +219,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -227,7 +227,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://github.com/dotnet/runtime @@ -235,7 +235,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://github.com/dotnet/runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + bb9f3c3cee21b449c6a2348eecf316d05b274389 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 9ac58198d9fe..c37719876829 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.18 6.0.18 6.0.18 - 6.0.18-servicing.23269.7 + 6.0.18-servicing.23272.16 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.18-servicing.23269.7 + 6.0.18-servicing.23272.16 6.0.1 6.0.0 6.0.2 From 133c2227f0bf77c22b41ad48823d92b4677efafd Mon Sep 17 00:00:00 2001 From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com> Date: Wed, 7 Jun 2023 12:06:04 -0700 Subject: [PATCH 02/83] Update branding to 6.0.19 (#48643) --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 184baa64d926..32a7d69dc821 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,7 +8,7 @@ 6 0 - 18 + 19 false - + @@ -25,7 +25,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d9f1015ade7f..bd39c9a62281 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 6482592dff6a30de0d36a2555b6b3e774ed253d2 + 74cfc260d2833dff7e595ae58bcbd6009655fe79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 6482592dff6a30de0d36a2555b6b3e774ed253d2 + 74cfc260d2833dff7e595ae58bcbd6009655fe79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 6482592dff6a30de0d36a2555b6b3e774ed253d2 + 74cfc260d2833dff7e595ae58bcbd6009655fe79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 6482592dff6a30de0d36a2555b6b3e774ed253d2 + 74cfc260d2833dff7e595ae58bcbd6009655fe79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 6482592dff6a30de0d36a2555b6b3e774ed253d2 + 74cfc260d2833dff7e595ae58bcbd6009655fe79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 6482592dff6a30de0d36a2555b6b3e774ed253d2 + 74cfc260d2833dff7e595ae58bcbd6009655fe79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 6482592dff6a30de0d36a2555b6b3e774ed253d2 + 74cfc260d2833dff7e595ae58bcbd6009655fe79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 6482592dff6a30de0d36a2555b6b3e774ed253d2 + 74cfc260d2833dff7e595ae58bcbd6009655fe79 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 5133e3cde150..56073b090b3c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -122,14 +122,14 @@ 6.0.10 - 6.0.18 - 6.0.18 - 6.0.18 - 6.0.18 - 6.0.18 - 6.0.18 - 6.0.18 - 6.0.18 + 6.0.19 + 6.0.19 + 6.0.19 + 6.0.19 + 6.0.19 + 6.0.19 + 6.0.19 + 6.0.19 6.0.0-beta.23211.7 6.0.0-beta.23211.7 From 4a493eec1b11cdb2d443fcf9ac013f5bd72fd645 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Thu, 8 Jun 2023 13:31:35 -0700 Subject: [PATCH 06/83] Don't run publish-specific Mvc.Testing tasks if project is not publishable (#43329) (#48364) --- .../Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets b/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets index b999ce824447..9d2b30b1c7ff 100644 --- a/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets +++ b/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets @@ -46,7 +46,7 @@ - + <_PublishManifestProjects Include="%(_ContentRootProjectReferences.FusionName)"> ~ From 31ec24f8bfb21793fe4a331a7bba95b4013d6870 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Mon, 12 Jun 2023 21:31:00 +0000 Subject: [PATCH 07/83] Merged PR 31212: [internal/release/6.0] Always return SignInResult.Failed if updating AccessFailedCount fails --- src/Identity/Core/src/SignInManager.cs | 126 ++++++++-- .../test/Identity.Test/SignInManagerTest.cs | 230 ++++++++++++++++++ 2 files changed, 340 insertions(+), 16 deletions(-) diff --git a/src/Identity/Core/src/SignInManager.cs b/src/Identity/Core/src/SignInManager.cs index 865834d6cc6a..7b22cf589617 100644 --- a/src/Identity/Core/src/SignInManager.cs +++ b/src/Identity/Core/src/SignInManager.cs @@ -6,6 +6,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Security.Claims; +using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Http; @@ -391,7 +392,14 @@ public virtual async Task CheckPasswordSignInAsync(TUser user, str // Only reset the lockout when not in quirks mode if either TFA is not enabled or the client is remembered for TFA. if (alwaysLockout || !await IsTfaEnabled(user) || await IsTwoFactorClientRememberedAsync(user)) { - await ResetLockout(user); + var resetLockoutResult = await ResetLockoutWithResult(user); + if (!resetLockoutResult.Succeeded) + { + // ResetLockout got an unsuccessful result that could be caused by concurrency failures indicating an + // attacker could be trying to bypass the MaxFailedAccessAttempts limit. Return the same failure we do + // when failing to increment the lockout to avoid giving an attacker extra guesses at the password. + return SignInResult.Failed; + } } return SignInResult.Success; @@ -401,7 +409,13 @@ public virtual async Task CheckPasswordSignInAsync(TUser user, str if (UserManager.SupportsUserLockout && lockoutOnFailure) { // If lockout is requested, increment access failed count which might lock out the user - await UserManager.AccessFailedAsync(user); + var incrementLockoutResult = await UserManager.AccessFailedAsync(user) ?? IdentityResult.Success; + if (!incrementLockoutResult.Succeeded) + { + // Return the same failure we do when resetting the lockout fails after a correct password. + return SignInResult.Failed; + } + if (await UserManager.IsLockedOutAsync(user)) { return await LockedOut(user); @@ -470,18 +484,23 @@ public virtual async Task TwoFactorRecoveryCodeSignInAsync(string var result = await UserManager.RedeemTwoFactorRecoveryCodeAsync(user, recoveryCode); if (result.Succeeded) { - await DoTwoFactorSignInAsync(user, twoFactorInfo, isPersistent: false, rememberClient: false); - return SignInResult.Success; + return await DoTwoFactorSignInAsync(user, twoFactorInfo, isPersistent: false, rememberClient: false); } // We don't protect against brute force attacks since codes are expected to be random. return SignInResult.Failed; } - private async Task DoTwoFactorSignInAsync(TUser user, TwoFactorAuthenticationInfo twoFactorInfo, bool isPersistent, bool rememberClient) + private async Task DoTwoFactorSignInAsync(TUser user, TwoFactorAuthenticationInfo twoFactorInfo, bool isPersistent, bool rememberClient) { - // When token is verified correctly, clear the access failed count used for lockout - await ResetLockout(user); + var resetLockoutResult = await ResetLockoutWithResult(user); + if (!resetLockoutResult.Succeeded) + { + // ResetLockout got an unsuccessful result that could be caused by concurrency failures indicating an + // attacker could be trying to bypass the MaxFailedAccessAttempts limit. Return the same failure we do + // when failing to increment the lockout to avoid giving an attacker extra guesses at the two factor code. + return SignInResult.Failed; + } var claims = new List(); claims.Add(new Claim("amr", "mfa")); @@ -499,6 +518,7 @@ private async Task DoTwoFactorSignInAsync(TUser user, TwoFactorAuthenticationInf await RememberTwoFactorClientAsync(user); } await SignInWithClaimsAsync(user, isPersistent, claims); + return SignInResult.Success; } /// @@ -531,11 +551,16 @@ public virtual async Task TwoFactorAuthenticatorSignInAsync(string if (await UserManager.VerifyTwoFactorTokenAsync(user, Options.Tokens.AuthenticatorTokenProvider, code)) { - await DoTwoFactorSignInAsync(user, twoFactorInfo, isPersistent, rememberClient); - return SignInResult.Success; + return await DoTwoFactorSignInAsync(user, twoFactorInfo, isPersistent, rememberClient); } // If the token is incorrect, record the failure which also may cause the user to be locked out - await UserManager.AccessFailedAsync(user); + var incrementLockoutResult = await UserManager.AccessFailedAsync(user) ?? IdentityResult.Success; + if (!incrementLockoutResult.Succeeded) + { + // Return the same failure we do when resetting the lockout fails after a correct two factor code. + // This is currently redundant, but it's here in case the code gets copied elsewhere. + return SignInResult.Failed; + } return SignInResult.Failed; } @@ -569,11 +594,16 @@ public virtual async Task TwoFactorSignInAsync(string provider, st } if (await UserManager.VerifyTwoFactorTokenAsync(user, provider, code)) { - await DoTwoFactorSignInAsync(user, twoFactorInfo, isPersistent, rememberClient); - return SignInResult.Success; + return await DoTwoFactorSignInAsync(user, twoFactorInfo, isPersistent, rememberClient); } // If the token is incorrect, record the failure which also may cause the user to be locked out - await UserManager.AccessFailedAsync(user); + var incrementLockoutResult = await UserManager.AccessFailedAsync(user) ?? IdentityResult.Success; + if (!incrementLockoutResult.Succeeded) + { + // Return the same failure we do when resetting the lockout fails after a correct two factor code. + // This is currently redundant, but it's here in case the code gets copied elsewhere. + return SignInResult.Failed; + } return SignInResult.Failed; } @@ -864,13 +894,77 @@ protected virtual async Task PreSignInCheck(TUser user) /// /// The user /// The that represents the asynchronous operation, containing the of the operation. - protected virtual Task ResetLockout(TUser user) + protected virtual async Task ResetLockout(TUser user) { if (UserManager.SupportsUserLockout) { - return UserManager.ResetAccessFailedCountAsync(user); + // The IdentityResult should not be null according to the annotations, but our own tests return null and I'm trying to limit breakages. + var result = await UserManager.ResetAccessFailedCountAsync(user) ?? IdentityResult.Success; + + if (!result.Succeeded) + { + throw new IdentityResultException(result); + } + } + } + + private async Task ResetLockoutWithResult(TUser user) + { + // Avoid relying on throwing an exception if we're not in a derived class. + if (GetType() == typeof(SignInManager)) + { + if (!UserManager.SupportsUserLockout) + { + return IdentityResult.Success; + } + + return await UserManager.ResetAccessFailedCountAsync(user) ?? IdentityResult.Success; + } + + try + { + var resetLockoutTask = ResetLockout(user); + + if (resetLockoutTask is Task resultTask) + { + return await resultTask ?? IdentityResult.Success; + } + + await resetLockoutTask; + return IdentityResult.Success; + } + catch (IdentityResultException ex) + { + return ex.IdentityResult; + } + } + + private sealed class IdentityResultException : Exception + { + internal IdentityResultException(IdentityResult result) : base() + { + IdentityResult = result; + } + + internal IdentityResult IdentityResult { get; set; } + + public override string Message + { + get + { + var sb = new StringBuilder("ResetLockout failed."); + + foreach (var error in IdentityResult.Errors) + { + sb.AppendLine(); + sb.Append(error.Code); + sb.Append(": "); + sb.Append(error.Description); + } + + return sb.ToString(); + } } - return Task.CompletedTask; } internal class TwoFactorAuthenticationInfo diff --git a/src/Identity/test/Identity.Test/SignInManagerTest.cs b/src/Identity/test/Identity.Test/SignInManagerTest.cs index 599feb5aa9b9..a5c353e0f347 100644 --- a/src/Identity/test/Identity.Test/SignInManagerTest.cs +++ b/src/Identity/test/Identity.Test/SignInManagerTest.cs @@ -1025,5 +1025,235 @@ public async Task ExternalLoginInfoAsyncReturnsAuthenticationPropertiesWithCusto Assert.NotNull(externalProperties); Assert.Equal("fizzbuzz", customValue); } + + public static object[][] SignInManagerTypeNames => new object[][] + { + new[] { nameof(SignInManager) }, + new[] { nameof(NoOverridesSignInManager) }, + new[] { nameof(OverrideAndAwaitBaseResetSignInManager) }, + new[] { nameof(OverrideAndPassThroughUserManagerResetSignInManager) }, + }; + + [Theory] + [MemberData(nameof(SignInManagerTypeNames))] + public async Task CheckPasswordSignInFailsWhenResetLockoutFails(string signInManagerTypeName) + { + // Setup + var user = new PocoUser { UserName = "Foo" }; + var manager = SetupUserManager(user); + manager.Setup(m => m.SupportsUserLockout).Returns(true).Verifiable(); + manager.Setup(m => m.IsLockedOutAsync(user)).ReturnsAsync(false).Verifiable(); + manager.Setup(m => m.CheckPasswordAsync(user, "[PLACEHOLDER]-1a")).ReturnsAsync(true).Verifiable(); + manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync(IdentityResult.Failed()).Verifiable(); + + var context = new DefaultHttpContext(); + var helper = SetupSignInManagerType(manager.Object, context, signInManagerTypeName); + + // Act + var result = await helper.CheckPasswordSignInAsync(user, "[PLACEHOLDER]-1a", false); + + // Assert + Assert.Same(SignInResult.Failed, result); + manager.Verify(); + } + + [Theory] + [MemberData(nameof(SignInManagerTypeNames))] + public async Task PasswordSignInWorksWhenResetLockoutReturnsNullIdentityResult(string signInManagerTypeName) + { + // Setup + var user = new PocoUser { UserName = "Foo" }; + var manager = SetupUserManager(user); + manager.Setup(m => m.SupportsUserLockout).Returns(true).Verifiable(); + manager.Setup(m => m.IsLockedOutAsync(user)).ReturnsAsync(false).Verifiable(); + manager.Setup(m => m.CheckPasswordAsync(user, "[PLACEHOLDER]-1a")).ReturnsAsync(true).Verifiable(); + manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync((IdentityResult)null).Verifiable(); + + var context = new DefaultHttpContext(); + var auth = MockAuth(context); + SetupSignIn(context, auth); + var helper = SetupSignInManagerType(manager.Object, context, signInManagerTypeName); + + // Act + var result = await helper.PasswordSignInAsync(user.UserName, "[PLACEHOLDER]-1a", false, false); + + // Assert + Assert.True(result.Succeeded); + manager.Verify(); + auth.Verify(); + } + + [Fact] + public async Task TwoFactorSignFailsWhenResetLockoutFails() + { + // Setup + var user = new PocoUser { UserName = "Foo" }; + var manager = SetupUserManager(user); + var provider = "twofactorprovider"; + var code = "123456"; + manager.Setup(m => m.SupportsUserLockout).Returns(true).Verifiable(); + manager.Setup(m => m.IsLockedOutAsync(user)).ReturnsAsync(false).Verifiable(); + manager.Setup(m => m.VerifyTwoFactorTokenAsync(user, provider, code)).ReturnsAsync(true).Verifiable(); + + manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync(IdentityResult.Failed()).Verifiable(); + + var context = new DefaultHttpContext(); + var auth = MockAuth(context); + var helper = SetupSignInManager(manager.Object, context); + var id = helper.StoreTwoFactorInfo(user.Id, null); + auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorUserIdScheme)) + .ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.TwoFactorUserIdScheme))).Verifiable(); + + // Act + var result = await helper.TwoFactorSignInAsync(provider, code, false, false); + + // Assert + Assert.Same(SignInResult.Failed, result); + manager.Verify(); + auth.Verify(); + } + + public static object[][] ExpectedLockedOutSignInResultsGivenAccessFailedResults => new object[][] + { + new object[] { IdentityResult.Success, SignInResult.LockedOut }, + new object[] { null, SignInResult.LockedOut }, + new object[] { IdentityResult.Failed(), SignInResult.Failed }, + }; + + [Theory] + [MemberData(nameof(ExpectedLockedOutSignInResultsGivenAccessFailedResults))] + public async Task CheckPasswordSignInLockedOutResultIsDependentOnTheAccessFailedAsyncResult(IdentityResult accessFailedResult, SignInResult expectedSignInResult) + { + // Setup + var isLockedOutCallCount = 0; + var user = new PocoUser { UserName = "Foo" }; + var manager = SetupUserManager(user); + manager.Setup(m => m.SupportsUserLockout).Returns(true).Verifiable(); + // Return false initially to allow the password to be checked Only return true the second time after the bogus password is checked. + manager.Setup(m => m.IsLockedOutAsync(user)).ReturnsAsync(() => isLockedOutCallCount++ > 0).Verifiable(); + manager.Setup(m => m.CheckPasswordAsync(user, "[PLACEHOLDER]-bogus1")).ReturnsAsync(false).Verifiable(); + manager.Setup(m => m.AccessFailedAsync(user)).ReturnsAsync(accessFailedResult).Verifiable(); + + var context = new DefaultHttpContext(); + // Since the PasswordSignInAsync calls the UserManager directly rather than a virtual SignInManager method like ResetLockout, we don't need to test derived SignInManagers. + var helper = SetupSignInManager(manager.Object, context); + + // Act + var result = await helper.CheckPasswordSignInAsync(user, "[PLACEHOLDER]-bogus1", lockoutOnFailure: true); + + // Assert + Assert.Same(expectedSignInResult, result); + manager.Verify(); + } + + public static object[][] AccessFailedResults => new object[][] + { + new object[] { IdentityResult.Success }, + new object[] { null }, + new object[] { IdentityResult.Failed() }, + }; + + [Theory] + [MemberData(nameof(AccessFailedResults))] + public async Task TwoFactorSignInLockedOutResultIsAlwaysGenericFailureRegardlessOfTheAccessFailedAsyncResult(IdentityResult accessFailedResult) + { + // Setup + var isLockedOutCallCount = 0; + var user = new PocoUser { UserName = "Foo" }; + var manager = SetupUserManager(user); + var provider = "twofactorprovider"; + var code = "123456"; + manager.Setup(m => m.SupportsUserLockout).Returns(true).Verifiable(); + // Return false initially to allow the 2fa code to be checked. Only return true if ever in the future it is called again after failure. + manager.Setup(m => m.IsLockedOutAsync(user)).ReturnsAsync(() => isLockedOutCallCount++ > 0).Verifiable(); + manager.Setup(m => m.VerifyTwoFactorTokenAsync(user, provider, code)).ReturnsAsync(false).Verifiable(); + + manager.Setup(m => m.AccessFailedAsync(user)).ReturnsAsync(accessFailedResult).Verifiable(); + + var context = new DefaultHttpContext(); + var auth = MockAuth(context); + var helper = SetupSignInManager(manager.Object, context); + var id = helper.StoreTwoFactorInfo(user.Id, null); + auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.TwoFactorUserIdScheme)) + .ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.TwoFactorUserIdScheme))).Verifiable(); + + // Act + var result = await helper.TwoFactorSignInAsync(provider, code, false, false); + + // Assert + // Unlike password sign in, 2fa always returns SignInResult.Failed rather than LockedOut. + Assert.Same(SignInResult.Failed, result); + manager.Verify(); + auth.Verify(); + } + + private static SignInManager SetupSignInManagerType(UserManager manager, HttpContext context, string typeName) + { + var contextAccessor = new Mock(); + contextAccessor.Setup(a => a.HttpContext).Returns(context); + var roleManager = MockHelpers.MockRoleManager(); + var options = Options.Create(new IdentityOptions()); + var claimsFactory = new UserClaimsPrincipalFactory(manager, roleManager.Object, options); + + return typeName switch + { + nameof(SignInManager) => new SignInManager(manager, contextAccessor.Object, claimsFactory, options, NullLogger>.Instance, Mock.Of(), new DefaultUserConfirmation()), + nameof(NoOverridesSignInManager) => new NoOverridesSignInManager(manager, contextAccessor.Object, claimsFactory, options), + nameof(OverrideAndAwaitBaseResetSignInManager) => new OverrideAndAwaitBaseResetSignInManager(manager, contextAccessor.Object, claimsFactory, options), + nameof(OverrideAndPassThroughUserManagerResetSignInManager) => new OverrideAndPassThroughUserManagerResetSignInManager(manager, contextAccessor.Object, claimsFactory, options), + _ => throw new NotImplementedException(), + }; + } + + private class NoOverridesSignInManager : SignInManager where TUser : class + { + public NoOverridesSignInManager( + UserManager userManager, + IHttpContextAccessor contextAccessor, + IUserClaimsPrincipalFactory claimsFactory, + IOptions optionsAccessor) + : base(userManager, contextAccessor, claimsFactory, optionsAccessor, NullLogger>.Instance, Mock.Of(), new DefaultUserConfirmation()) + { + } + } + + private class OverrideAndAwaitBaseResetSignInManager : SignInManager where TUser : class + { + public OverrideAndAwaitBaseResetSignInManager( + UserManager userManager, + IHttpContextAccessor contextAccessor, + IUserClaimsPrincipalFactory claimsFactory, + IOptions optionsAccessor) + : base(userManager, contextAccessor, claimsFactory, optionsAccessor, NullLogger>.Instance, Mock.Of(), new DefaultUserConfirmation()) + { + } + + protected override async Task ResetLockout(TUser user) + { + await base.ResetLockout(user); + } + } + + private class OverrideAndPassThroughUserManagerResetSignInManager : SignInManager where TUser : class + { + public OverrideAndPassThroughUserManagerResetSignInManager( + UserManager userManager, + IHttpContextAccessor contextAccessor, + IUserClaimsPrincipalFactory claimsFactory, + IOptions optionsAccessor) + : base(userManager, contextAccessor, claimsFactory, optionsAccessor, NullLogger>.Instance, Mock.Of(), new DefaultUserConfirmation()) + { + } + + protected override Task ResetLockout(TUser user) + { + if (UserManager.SupportsUserLockout) + { + return UserManager.ResetAccessFailedCountAsync(user); + } + + return Task.CompletedTask; + } + } } } From d61238b0ed0d027aaf9a04367bd3f09d0bb769fc Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Mon, 12 Jun 2023 23:01:39 +0000 Subject: [PATCH 08/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 40 ++++++++++++++++++++-------------------- eng/Versions.props | 14 +++++++------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/NuGet.config b/NuGet.config index df4d41539d89..1d57b8ee1e64 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bd39c9a62281..81e8701e00ec 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -131,7 +131,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 https://github.com/dotnet/runtime @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -191,7 +191,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -219,7 +219,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -227,7 +227,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 https://github.com/dotnet/runtime @@ -235,7 +235,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 https://github.com/dotnet/runtime @@ -245,40 +245,40 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - bb9f3c3cee21b449c6a2348eecf316d05b274389 + 61d7c70aaf511967552702f22c27a41649c5ffe8 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 56073b090b3c..6f56dc2b7bea 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,12 +63,12 @@ 6.0.0 - 6.0.18 - 6.0.18 - 6.0.18 - 6.0.18 - 6.0.18 - 6.0.18-servicing.23272.16 + 6.0.19 + 6.0.19 + 6.0.19 + 6.0.19 + 6.0.19 + 6.0.19-servicing.23312.9 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.18-servicing.23272.16 + 6.0.19-servicing.23312.9 6.0.1 6.0.0 6.0.2 From f139b7f8fa65c486f82a7290947dbc24f0ff6638 Mon Sep 17 00:00:00 2001 From: wtgodbe Date: Tue, 13 Jun 2023 10:46:08 -0700 Subject: [PATCH 09/83] Update baseline, SDK --- eng/Baseline.Designer.props | 498 ++++++++++++++++++------------------ eng/Baseline.xml | 214 ++++++++-------- eng/Versions.props | 2 +- global.json | 4 +- 4 files changed, 359 insertions(+), 359 deletions(-) diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index 0bc3741151f0..418848176995 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,28 +2,28 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - - - + + + @@ -34,120 +34,120 @@ - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 @@ -155,114 +155,114 @@ - 6.0.16 + 6.0.18 - - + + - - + + - - + + - 6.0.16 + 6.0.18 - + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - + - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - + - 6.0.16 + 6.0.18 - - - + + + - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - - + + @@ -270,81 +270,81 @@ - 6.0.16 + 6.0.18 - + - 6.0.16 + 6.0.18 - + - + - + - + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - + - + - + - 6.0.16 + 6.0.18 - - + + - + - - + + - + - - + + - + @@ -352,58 +352,58 @@ - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - + - + - + - 6.0.16 + 6.0.18 - + - + - + - 6.0.16 + 6.0.18 - + - 6.0.16 + 6.0.18 @@ -411,71 +411,71 @@ - 6.0.16 + 6.0.18 - + - 6.0.16 + 6.0.18 - - + + - - + + - - + + - - + + - 6.0.16 + 6.0.18 - - + + - + - - + + - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 @@ -491,195 +491,195 @@ - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - + - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - - + + - 6.0.16 + 6.0.18 - + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - + - + - 6.0.16 + 6.0.18 - - + + - - + + - - + + - 6.0.16 + 6.0.18 - - + + - - + + - - + + - - + + - 6.0.16 + 6.0.18 - + - + - + - + - + - 6.0.16 + 6.0.18 - + - + - + - 6.0.16 + 6.0.18 - + - + - + - 6.0.16 + 6.0.18 - + - + - + - 6.0.16 + 6.0.18 - - - - + + + + - 6.0.16 + 6.0.18 @@ -688,69 +688,69 @@ - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - + - 6.0.16 + 6.0.18 - + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 @@ -769,7 +769,7 @@ - 6.0.16 + 6.0.18 @@ -788,7 +788,7 @@ - 6.0.16 + 6.0.18 @@ -804,46 +804,46 @@ - 6.0.16 + 6.0.18 - + - + - + - + - + - + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - - - + + + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 @@ -853,7 +853,7 @@ - 6.0.16 + 6.0.18 @@ -862,79 +862,79 @@ - 6.0.16 + 6.0.18 - + - + - + - 6.0.16 + 6.0.18 - + - + - + - 6.0.16 + 6.0.18 - + - + - + - + - + - + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - + @@ -943,7 +943,7 @@ - + @@ -951,17 +951,17 @@ - + - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 @@ -979,13 +979,13 @@ - 6.0.16 + 6.0.18 - 6.0.16 + 6.0.18 - + \ No newline at end of file diff --git a/eng/Baseline.xml b/eng/Baseline.xml index aeb587b2481d..aafe6208659f 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -4,111 +4,111 @@ This file contains a list of all the packages and their versions which were rele Update this list when preparing for a new patch. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eng/Versions.props b/eng/Versions.props index 696641326f1f..afa2abfaae1a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -9,7 +9,7 @@ 6 0 19 - false + true diff --git a/global.json b/global.json index 7b988f07763d..4cf41a4bb8e2 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "6.0.116" + "version": "6.0.118" }, "tools": { - "dotnet": "6.0.116", + "dotnet": "6.0.118", "runtimes": { "dotnet/x64": [ "2.1.30", From 4c856c9055fde4f2d1efecab674567bcb3125681 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 14 Jun 2023 00:28:40 +0000 Subject: [PATCH 10/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 2 ++ eng/Version.Details.xml | 24 ++++++++++++------------ eng/Versions.props | 6 +++--- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/NuGet.config b/NuGet.config index 1d57b8ee1e64..269b312051ea 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,6 +4,7 @@ + @@ -29,6 +30,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 81e8701e00ec..4ab496977d2a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + e2176dfe59cc071eb14362fb0c9cfea329d7b72e https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -219,7 +219,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + e2176dfe59cc071eb14362fb0c9cfea329d7b72e https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + e2176dfe59cc071eb14362fb0c9cfea329d7b72e https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + e2176dfe59cc071eb14362fb0c9cfea329d7b72e https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + e2176dfe59cc071eb14362fb0c9cfea329d7b72e https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + e2176dfe59cc071eb14362fb0c9cfea329d7b72e https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + e2176dfe59cc071eb14362fb0c9cfea329d7b72e - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + e2176dfe59cc071eb14362fb0c9cfea329d7b72e - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + e2176dfe59cc071eb14362fb0c9cfea329d7b72e https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 32dafc5e3d3d..2245c783f041 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.19 6.0.19 6.0.19 - 6.0.19-servicing.23312.9 + 6.0.19-servicing.23313.13 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.19-servicing.23312.9 + 6.0.19-servicing.23313.13 6.0.1 6.0.0 6.0.2 @@ -120,7 +120,7 @@ 6.0.8 6.0.0 - 6.0.10 + 6.0.11 6.0.19 6.0.19 From 6a323b07e4fa4eb96e1d9e632910a7b0069a02d8 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 14 Jun 2023 04:39:50 +0000 Subject: [PATCH 11/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-efcore dnceng/internal/dotnet-runtime --- NuGet.config | 8 ++++---- eng/Version.Details.xml | 36 ++++++++++++++++++------------------ eng/Versions.props | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/NuGet.config b/NuGet.config index 269b312051ea..ad532855d3b9 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,11 +4,11 @@ + - - + @@ -26,11 +26,11 @@ - + - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4ab496977d2a..e69afaf27490 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -11,35 +11,35 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 74cfc260d2833dff7e595ae58bcbd6009655fe79 + 20faffcfecb6a2884c29f4b4fc218904cfe5a30e https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 74cfc260d2833dff7e595ae58bcbd6009655fe79 + 20faffcfecb6a2884c29f4b4fc218904cfe5a30e https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 74cfc260d2833dff7e595ae58bcbd6009655fe79 + 20faffcfecb6a2884c29f4b4fc218904cfe5a30e https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 74cfc260d2833dff7e595ae58bcbd6009655fe79 + 20faffcfecb6a2884c29f4b4fc218904cfe5a30e https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 74cfc260d2833dff7e595ae58bcbd6009655fe79 + 20faffcfecb6a2884c29f4b4fc218904cfe5a30e https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 74cfc260d2833dff7e595ae58bcbd6009655fe79 + 20faffcfecb6a2884c29f4b4fc218904cfe5a30e https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 74cfc260d2833dff7e595ae58bcbd6009655fe79 + 20faffcfecb6a2884c29f4b4fc218904cfe5a30e https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 74cfc260d2833dff7e595ae58bcbd6009655fe79 + 20faffcfecb6a2884c29f4b4fc218904cfe5a30e https://github.com/dotnet/runtime @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e2176dfe59cc071eb14362fb0c9cfea329d7b72e + fcf11495c6989362aa1012dc0d303ce619413624 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e2176dfe59cc071eb14362fb0c9cfea329d7b72e + fcf11495c6989362aa1012dc0d303ce619413624 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e2176dfe59cc071eb14362fb0c9cfea329d7b72e + fcf11495c6989362aa1012dc0d303ce619413624 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e2176dfe59cc071eb14362fb0c9cfea329d7b72e + fcf11495c6989362aa1012dc0d303ce619413624 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e2176dfe59cc071eb14362fb0c9cfea329d7b72e + fcf11495c6989362aa1012dc0d303ce619413624 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e2176dfe59cc071eb14362fb0c9cfea329d7b72e + fcf11495c6989362aa1012dc0d303ce619413624 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e2176dfe59cc071eb14362fb0c9cfea329d7b72e + fcf11495c6989362aa1012dc0d303ce619413624 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e2176dfe59cc071eb14362fb0c9cfea329d7b72e + fcf11495c6989362aa1012dc0d303ce619413624 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 2245c783f041..b3347e69ca14 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.19 6.0.19 6.0.19 - 6.0.19-servicing.23313.13 + 6.0.19-servicing.23313.25 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.19-servicing.23313.13 + 6.0.19-servicing.23313.25 6.0.1 6.0.0 6.0.2 From ec36c16df1a46acc21a5909287c667be048defaa Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 15 Jun 2023 22:42:40 +0000 Subject: [PATCH 12/83] Update dependencies from https://github.com/dotnet/arcade build 20230613.5 (#48843) [release/6.0] Update dependencies from dotnet/arcade --- NuGet.config | 4 --- eng/Version.Details.xml | 16 ++++++------ eng/Versions.props | 4 +-- eng/common/templates/job/job.yml | 26 +++++++++++++------ .../templates/steps/component-governance.yml | 10 +++++++ global.json | 4 +-- 6 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 eng/common/templates/steps/component-governance.yml diff --git a/NuGet.config b/NuGet.config index 0a5c13c4361a..1e2458c409ad 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,8 @@ - - @@ -25,10 +23,8 @@ - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1fe89a302f9c..aee734fd18bc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -280,22 +280,22 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime c76ac565499f3e7c657126d46c00b67a0d74832c - + https://github.com/dotnet/arcade - 7bca7a24dfc0eded1f3e364b4ff7bf1235b6eb26 + 91616785a1a6578c83f7e93d98c34a1eb83d6223 - + https://github.com/dotnet/arcade - 7bca7a24dfc0eded1f3e364b4ff7bf1235b6eb26 + 91616785a1a6578c83f7e93d98c34a1eb83d6223 - + https://github.com/dotnet/arcade - 7bca7a24dfc0eded1f3e364b4ff7bf1235b6eb26 + 91616785a1a6578c83f7e93d98c34a1eb83d6223 - + https://github.com/dotnet/arcade - 7bca7a24dfc0eded1f3e364b4ff7bf1235b6eb26 + 91616785a1a6578c83f7e93d98c34a1eb83d6223 diff --git a/eng/Versions.props b/eng/Versions.props index afa2abfaae1a..89199c876b76 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -131,8 +131,8 @@ 6.0.18 6.0.18 - 6.0.0-beta.23211.7 - 6.0.0-beta.23211.7 + 6.0.0-beta.23313.5 + 6.0.0-beta.23313.5 - + @@ -26,7 +26,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e69afaf27490..c842ece3691c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -11,35 +11,35 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 20faffcfecb6a2884c29f4b4fc218904cfe5a30e + 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 20faffcfecb6a2884c29f4b4fc218904cfe5a30e + 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 20faffcfecb6a2884c29f4b4fc218904cfe5a30e + 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 20faffcfecb6a2884c29f4b4fc218904cfe5a30e + 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 20faffcfecb6a2884c29f4b4fc218904cfe5a30e + 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 20faffcfecb6a2884c29f4b4fc218904cfe5a30e + 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 20faffcfecb6a2884c29f4b4fc218904cfe5a30e + 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 20faffcfecb6a2884c29f4b4fc218904cfe5a30e + 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d https://github.com/dotnet/runtime From f8b6353a51b36a23746a679da14805bfae7d1374 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 20 Jun 2023 01:43:33 +0000 Subject: [PATCH 14/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-efcore --- NuGet.config | 6 ++---- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/NuGet.config b/NuGet.config index 93f6c29f1b33..20dac47b1f28 100644 --- a/NuGet.config +++ b/NuGet.config @@ -5,10 +5,9 @@ - - + @@ -26,10 +25,9 @@ - + - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f278b7664cb7..a3699d7f2dd5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d + 16d152f81ed675c2705aa38b8d6d4027b6525602 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d + 16d152f81ed675c2705aa38b8d6d4027b6525602 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d + 16d152f81ed675c2705aa38b8d6d4027b6525602 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d + 16d152f81ed675c2705aa38b8d6d4027b6525602 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d + 16d152f81ed675c2705aa38b8d6d4027b6525602 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d + 16d152f81ed675c2705aa38b8d6d4027b6525602 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d + 16d152f81ed675c2705aa38b8d6d4027b6525602 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 77c1fd34b40c7b0fe6a3f3423ae809bd18eb296d + 16d152f81ed675c2705aa38b8d6d4027b6525602 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 7e8aba74de0b..14686a5ae8b3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -122,14 +122,14 @@ 6.0.11 - 6.0.19 - 6.0.19 - 6.0.19 - 6.0.19 - 6.0.19 - 6.0.19 - 6.0.19 - 6.0.19 + 6.0.20 + 6.0.20 + 6.0.20 + 6.0.20 + 6.0.20 + 6.0.20 + 6.0.20 + 6.0.20 6.0.0-beta.23313.5 6.0.0-beta.23313.5 From c9930616821f5d45cad3dd58694980272c960f1f Mon Sep 17 00:00:00 2001 From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com> Date: Tue, 20 Jun 2023 09:59:04 -0700 Subject: [PATCH 15/83] Update branding to 6.0.20 (#48900) --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 89199c876b76..d78820f26735 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,8 +8,8 @@ 6 0 - 19 - true + 20 + false From c34980ca5ff05b3673b08399dbe40e0d027d14bd Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 21 Jun 2023 00:32:27 +0000 Subject: [PATCH 16/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 30 +++++++++++++++--------------- eng/Versions.props | 14 +++++++------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/NuGet.config b/NuGet.config index 20dac47b1f28..5fe2b4af9609 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a3699d7f2dd5..7bc369d66183 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - fcf11495c6989362aa1012dc0d303ce619413624 + a08d9ce2caf02455c0b825bcdc32974bdf769a80 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -245,40 +245,40 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - fcf11495c6989362aa1012dc0d303ce619413624 + a08d9ce2caf02455c0b825bcdc32974bdf769a80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - fcf11495c6989362aa1012dc0d303ce619413624 + a08d9ce2caf02455c0b825bcdc32974bdf769a80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - fcf11495c6989362aa1012dc0d303ce619413624 + a08d9ce2caf02455c0b825bcdc32974bdf769a80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - fcf11495c6989362aa1012dc0d303ce619413624 + a08d9ce2caf02455c0b825bcdc32974bdf769a80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - fcf11495c6989362aa1012dc0d303ce619413624 + a08d9ce2caf02455c0b825bcdc32974bdf769a80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - fcf11495c6989362aa1012dc0d303ce619413624 + a08d9ce2caf02455c0b825bcdc32974bdf769a80 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - fcf11495c6989362aa1012dc0d303ce619413624 + a08d9ce2caf02455c0b825bcdc32974bdf769a80 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index a79e7324210a..a291fc7427e2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,12 +63,12 @@ 6.0.0 - 6.0.19 - 6.0.19 - 6.0.19 - 6.0.19 - 6.0.19 - 6.0.19-servicing.23313.25 + 6.0.20 + 6.0.20 + 6.0.20 + 6.0.20 + 6.0.20 + 6.0.20-servicing.23320.17 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.19-servicing.23313.25 + 6.0.20-servicing.23320.17 6.0.1 6.0.0 6.0.2 From 39e0501ee91dcf2b9b885d647795184815fb0408 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 21 Jun 2023 16:52:30 +0000 Subject: [PATCH 17/83] Merged PR 32115: Fix shas for July --- eng/Version.Details.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7bc369d66183..e05d62f7680e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -131,7 +131,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + c76ac565499f3e7c657126d46c00b67a0d74832c https://github.com/dotnet/runtime @@ -191,7 +191,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + c76ac565499f3e7c657126d46c00b67a0d74832c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -219,7 +219,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e2176dfe59cc071eb14362fb0c9cfea329d7b72e + c76ac565499f3e7c657126d46c00b67a0d74832c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -227,7 +227,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + c76ac565499f3e7c657126d46c00b67a0d74832c https://github.com/dotnet/runtime @@ -235,7 +235,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 61d7c70aaf511967552702f22c27a41649c5ffe8 + c76ac565499f3e7c657126d46c00b67a0d74832c https://github.com/dotnet/runtime From 5ed120906ff39d3f2f3e8c1ec2e51c0a2e34efd5 Mon Sep 17 00:00:00 2001 From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com> Date: Wed, 5 Jul 2023 16:09:36 -0700 Subject: [PATCH 18/83] Update branding to 6.0.21 (#49234) --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index d78820f26735..6c82a695ccd0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,7 +8,7 @@ 6 0 - 20 + 21 false - + - + @@ -25,10 +25,10 @@ - + - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e05d62f7680e..c7b164140a1f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 16d152f81ed675c2705aa38b8d6d4027b6525602 + 06531f7f252f34b2e6c48e3179454d36864a416d - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 16d152f81ed675c2705aa38b8d6d4027b6525602 + 06531f7f252f34b2e6c48e3179454d36864a416d - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 16d152f81ed675c2705aa38b8d6d4027b6525602 + 06531f7f252f34b2e6c48e3179454d36864a416d - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 16d152f81ed675c2705aa38b8d6d4027b6525602 + 06531f7f252f34b2e6c48e3179454d36864a416d - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 16d152f81ed675c2705aa38b8d6d4027b6525602 + 06531f7f252f34b2e6c48e3179454d36864a416d - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 16d152f81ed675c2705aa38b8d6d4027b6525602 + 06531f7f252f34b2e6c48e3179454d36864a416d - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 16d152f81ed675c2705aa38b8d6d4027b6525602 + 06531f7f252f34b2e6c48e3179454d36864a416d - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 16d152f81ed675c2705aa38b8d6d4027b6525602 + 06531f7f252f34b2e6c48e3179454d36864a416d https://github.com/dotnet/runtime @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a08d9ce2caf02455c0b825bcdc32974bdf769a80 + db1112f52a8581622202f02951e195e57421fc0f https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -245,40 +245,40 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a08d9ce2caf02455c0b825bcdc32974bdf769a80 + db1112f52a8581622202f02951e195e57421fc0f - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a08d9ce2caf02455c0b825bcdc32974bdf769a80 + db1112f52a8581622202f02951e195e57421fc0f - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a08d9ce2caf02455c0b825bcdc32974bdf769a80 + db1112f52a8581622202f02951e195e57421fc0f - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a08d9ce2caf02455c0b825bcdc32974bdf769a80 + db1112f52a8581622202f02951e195e57421fc0f - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a08d9ce2caf02455c0b825bcdc32974bdf769a80 + db1112f52a8581622202f02951e195e57421fc0f - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a08d9ce2caf02455c0b825bcdc32974bdf769a80 + db1112f52a8581622202f02951e195e57421fc0f https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a08d9ce2caf02455c0b825bcdc32974bdf769a80 + db1112f52a8581622202f02951e195e57421fc0f https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 9dc73dcfe989..999cc24d5443 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,12 +63,12 @@ 6.0.0 - 6.0.20 - 6.0.20 - 6.0.20 - 6.0.20 - 6.0.20 - 6.0.20-servicing.23320.17 + 6.0.21 + 6.0.21 + 6.0.21 + 6.0.21 + 6.0.21 + 6.0.21-servicing.23355.12 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.20-servicing.23320.17 + 6.0.21-servicing.23355.12 6.0.1 6.0.0 6.0.2 @@ -122,14 +122,14 @@ 6.0.11 - 6.0.20 - 6.0.20 - 6.0.20 - 6.0.20 - 6.0.20 - 6.0.20 - 6.0.20 - 6.0.20 + 6.0.21 + 6.0.21 + 6.0.21 + 6.0.21 + 6.0.21 + 6.0.21 + 6.0.21 + 6.0.21 6.0.0-beta.23313.5 6.0.0-beta.23313.5 From b5bccf65e36b64de3906f68f36d950c2959bb0cb Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Fri, 7 Jul 2023 02:52:52 +1000 Subject: [PATCH 20/83] [release/6.0] Backport 48892 to 6.0 (#48914) * Backport 48892 to 6.0 * Update unit test to work around bug found on main. * Fix up file level namespace statement to use block syntax. --- .../WebSockets/src/ServerWebSocket.cs | 82 ++++++++++ .../WebSockets/src/WebSocketMiddleware.cs | 4 +- .../UnitTests/WebSocketMiddlewareTests.cs | 141 ++++++++++++++++++ 3 files changed, 226 insertions(+), 1 deletion(-) create mode 100644 src/Middleware/WebSockets/src/ServerWebSocket.cs diff --git a/src/Middleware/WebSockets/src/ServerWebSocket.cs b/src/Middleware/WebSockets/src/ServerWebSocket.cs new file mode 100644 index 000000000000..1fe6351237d2 --- /dev/null +++ b/src/Middleware/WebSockets/src/ServerWebSocket.cs @@ -0,0 +1,82 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Net.WebSockets; +using Microsoft.AspNetCore.Http; + +namespace Microsoft.AspNetCore.WebSockets +{ + /// + /// Used in ASP.NET Core to wrap a WebSocket with its associated HttpContext so that when the WebSocket is aborted + /// the underlying HttpContext is aborted. All other methods are delegated to the underlying WebSocket. + /// + internal sealed class ServerWebSocket : WebSocket + { + private readonly WebSocket _wrappedSocket; + private readonly HttpContext _context; + + internal ServerWebSocket(WebSocket wrappedSocket, HttpContext context) + { + ArgumentNullException.ThrowIfNull(wrappedSocket); + ArgumentNullException.ThrowIfNull(context); + + _wrappedSocket = wrappedSocket; + _context = context; + } + + public override WebSocketCloseStatus? CloseStatus => _wrappedSocket.CloseStatus; + + public override string? CloseStatusDescription => _wrappedSocket.CloseStatusDescription; + + public override WebSocketState State => _wrappedSocket.State; + + public override string? SubProtocol => _wrappedSocket.SubProtocol; + + public override void Abort() + { + _wrappedSocket.Abort(); + _context.Abort(); + } + + public override Task CloseAsync(WebSocketCloseStatus closeStatus, string? statusDescription, CancellationToken cancellationToken) + { + return _wrappedSocket.CloseAsync(closeStatus, statusDescription, cancellationToken); + } + + public override Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string? statusDescription, CancellationToken cancellationToken) + { + return _wrappedSocket.CloseOutputAsync(closeStatus, statusDescription, cancellationToken); + } + + public override void Dispose() + { + _wrappedSocket.Dispose(); + } + + public override Task ReceiveAsync(ArraySegment buffer, CancellationToken cancellationToken) + { + return _wrappedSocket.ReceiveAsync(buffer, cancellationToken); + } + + public override ValueTask ReceiveAsync(Memory buffer, CancellationToken cancellationToken) + { + return _wrappedSocket.ReceiveAsync(buffer, cancellationToken); + } + + public override ValueTask SendAsync(ReadOnlyMemory buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken) + { + return _wrappedSocket.SendAsync(buffer, messageType, endOfMessage, cancellationToken); + } + + public override ValueTask SendAsync(ReadOnlyMemory buffer, WebSocketMessageType messageType, WebSocketMessageFlags messageFlags, CancellationToken cancellationToken) + { + return _wrappedSocket.SendAsync(buffer, messageType, messageFlags, cancellationToken); + } + + public override Task SendAsync(ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken) + { + return _wrappedSocket.SendAsync(buffer, messageType, endOfMessage, cancellationToken); + } + } +} + diff --git a/src/Middleware/WebSockets/src/WebSocketMiddleware.cs b/src/Middleware/WebSockets/src/WebSocketMiddleware.cs index 6904450e6578..ff6a589bff18 100644 --- a/src/Middleware/WebSockets/src/WebSocketMiddleware.cs +++ b/src/Middleware/WebSockets/src/WebSocketMiddleware.cs @@ -194,13 +194,15 @@ public async Task AcceptAsync(WebSocketAcceptContext acceptContext) Stream opaqueTransport = await _upgradeFeature.UpgradeAsync(); // Sets status code to 101 - return WebSocket.CreateFromStream(opaqueTransport, new WebSocketCreationOptions() + var wrappedSocket = WebSocket.CreateFromStream(opaqueTransport, new WebSocketCreationOptions() { IsServer = true, KeepAliveInterval = keepAliveInterval, SubProtocol = subProtocol, DangerousDeflateOptions = deflateOptions }); + + return new ServerWebSocket(wrappedSocket, _context); } public static bool CheckSupportedWebSocketRequest(string method, IHeaderDictionary requestHeaders) diff --git a/src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs b/src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs index aa67be817719..97395bdd819f 100644 --- a/src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs +++ b/src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs @@ -6,6 +6,7 @@ using System.Net.Http; using System.Net.WebSockets; using System.Text; +using Microsoft.AspNetCore.Connections; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Testing; @@ -499,6 +500,146 @@ public async Task CloseFromCloseReceived_Success() } } + [Fact] + public async Task WebSocket_Abort_Interrupts_Pending_ReceiveAsync() + { + WebSocket serverSocket = null; + + // Events that we want to sequence execution across client and server. + var socketWasAccepted = new ManualResetEventSlim(); + var socketWasAborted = new ManualResetEventSlim(); + var firstReceiveOccured = new ManualResetEventSlim(); + var secondReceiveInitiated = new ManualResetEventSlim(); + + Exception receiveException = null; + + await using (var server = KestrelWebSocketHelpers.CreateServer(LoggerFactory, out var port, async context => + { + Assert.True(context.WebSockets.IsWebSocketRequest); + serverSocket = await context.WebSockets.AcceptWebSocketAsync(); + socketWasAccepted.Set(); + + var serverBuffer = new byte[1024]; + + try + { + while (serverSocket.State is WebSocketState.Open or WebSocketState.CloseSent) + { + if (firstReceiveOccured.IsSet) + { + var pendingResponse = serverSocket.ReceiveAsync(serverBuffer, default); + secondReceiveInitiated.Set(); + var response = await pendingResponse; + } + else + { + var response = await serverSocket.ReceiveAsync(serverBuffer, default); + firstReceiveOccured.Set(); + } + } + } + catch (ConnectionAbortedException ex) + { + socketWasAborted.Set(); + receiveException = ex; + } + catch (Exception ex) + { + // Capture this exception so a test failure can give us more information. + receiveException = ex; + } + finally + { + Assert.IsType(receiveException); + } + })) + { + var clientBuffer = new byte[1024]; + + using (var client = new ClientWebSocket()) + { + await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); + + var socketWasAcceptedDidNotTimeout = socketWasAccepted.Wait(10000); + Assert.True(socketWasAcceptedDidNotTimeout, "Socket was not accepted within the allotted time."); + + await client.SendAsync(clientBuffer, WebSocketMessageType.Binary, false, default); + + var firstReceiveOccuredDidNotTimeout = firstReceiveOccured.Wait(10000); + Assert.True(firstReceiveOccuredDidNotTimeout, "First receive did not occur within the allotted time."); + + var secondReceiveInitiatedDidNotTimeout = secondReceiveInitiated.Wait(10000); + Assert.True(secondReceiveInitiatedDidNotTimeout, "Second receive was not initiated within the allotted time."); + + serverSocket.Abort(); + + var socketWasAbortedDidNotTimeout = socketWasAborted.Wait(1000); // Give it a second to process the abort. + Assert.True(socketWasAbortedDidNotTimeout, "Abort did not occur within the allotted time."); + } + } + } + + [Fact] + public async Task WebSocket_AllowsCancelling_Pending_ReceiveAsync_When_CancellationTokenProvided() + { + WebSocket serverSocket = null; + CancellationTokenSource cts = new CancellationTokenSource(); + + var socketWasAccepted = new ManualResetEventSlim(); + var operationWasCancelled = new ManualResetEventSlim(); + var firstReceiveOccured = new ManualResetEventSlim(); + + await using (var server = KestrelWebSocketHelpers.CreateServer(LoggerFactory, out var port, async context => + { + Assert.True(context.WebSockets.IsWebSocketRequest); + serverSocket = await context.WebSockets.AcceptWebSocketAsync(); + socketWasAccepted.Set(); + + var serverBuffer = new byte[1024]; + + var finishedWithOperationCancelled = false; + + try + { + while (serverSocket.State is WebSocketState.Open or WebSocketState.CloseSent) + { + var response = await serverSocket.ReceiveAsync(serverBuffer, cts.Token); + firstReceiveOccured.Set(); + } + } + catch (OperationCanceledException) + { + operationWasCancelled.Set(); + finishedWithOperationCancelled = true; + } + finally + { + Assert.True(finishedWithOperationCancelled); + } + })) + { + var clientBuffer = new byte[1024]; + + using (var client = new ClientWebSocket()) + { + await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); + + var socketWasAcceptedDidNotTimeout = socketWasAccepted.Wait(10000); + Assert.True(socketWasAcceptedDidNotTimeout, "Socket was not accepted within the allotted time."); + + await client.SendAsync(clientBuffer, WebSocketMessageType.Binary, false, default); + + var firstReceiveOccuredDidNotTimeout = firstReceiveOccured.Wait(10000); + Assert.True(firstReceiveOccuredDidNotTimeout, "First receive did not occur within the allotted time."); + + cts.Cancel(); + + var operationWasCancelledDidNotTimeout = operationWasCancelled.Wait(1000); // Give it a second to process the abort. + Assert.True(operationWasCancelledDidNotTimeout, "Cancel did not occur within the allotted time."); + } + } + } + [Theory] [InlineData(HttpStatusCode.OK, null)] [InlineData(HttpStatusCode.Forbidden, "")] From 8a8f51d6fcbcd5a6cbfc3e79ab307b22abf60748 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 09:53:26 -0700 Subject: [PATCH 21/83] [release/6.0] (deps): Bump src/submodules/googletest (#49137) Bumps [src/submodules/googletest](https://github.com/google/googletest) from `04cf298` to `be03d00`. - [Release notes](https://github.com/google/googletest/releases) - [Commits](https://github.com/google/googletest/compare/04cf2989168a3f9218d463bea6f15f8ade2032fd...be03d00f5f0cc3a997d1a368bee8a1fe93651f48) --- updated-dependencies: - dependency-name: src/submodules/googletest dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/submodules/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/googletest b/src/submodules/googletest index 04cf2989168a..be03d00f5f0c 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit 04cf2989168a3f9218d463bea6f15f8ade2032fd +Subproject commit be03d00f5f0cc3a997d1a368bee8a1fe93651f48 From e49d53e68b2ea8dd5e38b88fda2be587b540cace Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Thu, 6 Jul 2023 19:52:46 +0000 Subject: [PATCH 22/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-efcore --- NuGet.config | 4 ++-- eng/Version.Details.xml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NuGet.config b/NuGet.config index bed55ad23787..eb22c5afdc17 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,7 +7,7 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c7b164140a1f..52a5f4eb7e05 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -11,35 +11,35 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 06531f7f252f34b2e6c48e3179454d36864a416d + 54d936f07e28cfd2edda5a53de8e70739f6e9675 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 06531f7f252f34b2e6c48e3179454d36864a416d + 54d936f07e28cfd2edda5a53de8e70739f6e9675 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 06531f7f252f34b2e6c48e3179454d36864a416d + 54d936f07e28cfd2edda5a53de8e70739f6e9675 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 06531f7f252f34b2e6c48e3179454d36864a416d + 54d936f07e28cfd2edda5a53de8e70739f6e9675 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 06531f7f252f34b2e6c48e3179454d36864a416d + 54d936f07e28cfd2edda5a53de8e70739f6e9675 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 06531f7f252f34b2e6c48e3179454d36864a416d + 54d936f07e28cfd2edda5a53de8e70739f6e9675 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 06531f7f252f34b2e6c48e3179454d36864a416d + 54d936f07e28cfd2edda5a53de8e70739f6e9675 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 06531f7f252f34b2e6c48e3179454d36864a416d + 54d936f07e28cfd2edda5a53de8e70739f6e9675 https://github.com/dotnet/runtime From 79a2b3a29442351143c4a514450a317faf1411f0 Mon Sep 17 00:00:00 2001 From: Brennan Conroy Date: Thu, 6 Jul 2023 20:12:44 +0000 Subject: [PATCH 23/83] Merged PR 31898: Avoid Redis pattern matching Avoid Redis pattern matching --- .../src/Internal/RedisChannels.cs | 3 + .../src/RedisHubLifetimeManager.cs | 20 +++--- .../StackExchangeRedis/test/RedisEndToEnd.cs | 67 +++++++++++++++++++ .../test/RedisHubLifetimeManagerTests.cs | 20 ++++++ .../test/TestConnectionMultiplexer.cs | 27 ++++++++ 5 files changed, 127 insertions(+), 10 deletions(-) diff --git a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisChannels.cs b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisChannels.cs index 6f973ea87ec9..2c783329b230 100644 --- a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisChannels.cs +++ b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisChannels.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Runtime.CompilerServices; +using StackExchange.Redis; namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal { @@ -71,5 +72,7 @@ public string Ack(string serverName) { return _prefix + ":internal:ack:" + serverName; } + + public static RedisChannel GetChannel(string channelName) => new RedisChannel(channelName, RedisChannel.PatternMode.Literal); } } diff --git a/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs b/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs index ee9fa0e209fc..8007eb34f3f6 100644 --- a/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs +++ b/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs @@ -114,7 +114,7 @@ public override Task OnDisconnectedAsync(HubConnectionContext connection) var connectionChannel = _channels.Connection(connection.ConnectionId); RedisLog.Unsubscribe(_logger, connectionChannel); - tasks.Add(_bus!.UnsubscribeAsync(connectionChannel)); + tasks.Add(_bus!.UnsubscribeAsync(RedisChannels.GetChannel(connectionChannel))); var feature = connection.Features.Get()!; var groupNames = feature.Groups; @@ -315,7 +315,7 @@ private async Task PublishAsync(string channel, byte[] payload) { await EnsureRedisServerConnection(); RedisLog.PublishToChannel(_logger, channel); - await _bus!.PublishAsync(channel, payload); + await _bus!.PublishAsync(RedisChannels.GetChannel(channel), payload); } private Task AddGroupAsyncCore(HubConnectionContext connection, string groupName) @@ -347,7 +347,7 @@ private async Task RemoveGroupAsyncCore(HubConnectionContext connection, string await _groups.RemoveSubscriptionAsync(groupChannel, connection, channelName => { RedisLog.Unsubscribe(_logger, channelName); - return _bus!.UnsubscribeAsync(channelName); + return _bus!.UnsubscribeAsync(RedisChannels.GetChannel(channelName)); }); var feature = connection.Features.Get()!; @@ -379,7 +379,7 @@ private Task RemoveUserAsync(HubConnectionContext connection) return _users.RemoveSubscriptionAsync(userChannel, connection, channelName => { RedisLog.Unsubscribe(_logger, channelName); - return _bus!.UnsubscribeAsync(channelName); + return _bus!.UnsubscribeAsync(RedisChannels.GetChannel(channelName)); }); } @@ -396,7 +396,7 @@ public void Dispose() private async Task SubscribeToAll() { RedisLog.Subscribing(_logger, _channels.All); - var channel = await _bus!.SubscribeAsync(_channels.All); + var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(_channels.All)); channel.OnMessage(async channelMessage => { try @@ -426,7 +426,7 @@ private async Task SubscribeToAll() private async Task SubscribeToGroupManagementChannel() { - var channel = await _bus!.SubscribeAsync(_channels.GroupManagement); + var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(_channels.GroupManagement)); channel.OnMessage(async channelMessage => { try @@ -463,7 +463,7 @@ private async Task SubscribeToGroupManagementChannel() private async Task SubscribeToAckChannel() { // Create server specific channel in order to send an ack to a single server - var channel = await _bus!.SubscribeAsync(_channels.Ack(_serverName)); + var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(_channels.Ack(_serverName))); channel.OnMessage(channelMessage => { var ackId = _protocol.ReadAck((byte[])channelMessage.Message); @@ -477,7 +477,7 @@ private async Task SubscribeToConnection(HubConnectionContext connection) var connectionChannel = _channels.Connection(connection.ConnectionId); RedisLog.Subscribing(_logger, connectionChannel); - var channel = await _bus!.SubscribeAsync(connectionChannel); + var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(connectionChannel)); channel.OnMessage(channelMessage => { var invocation = _protocol.ReadInvocation((byte[])channelMessage.Message); @@ -492,7 +492,7 @@ private Task SubscribeToUser(HubConnectionContext connection) return _users.AddSubscriptionAsync(userChannel, connection, async (channelName, subscriptions) => { RedisLog.Subscribing(_logger, channelName); - var channel = await _bus!.SubscribeAsync(channelName); + var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(channelName)); channel.OnMessage(async channelMessage => { try @@ -518,7 +518,7 @@ private Task SubscribeToUser(HubConnectionContext connection) private async Task SubscribeToGroupAsync(string groupChannel, HubConnectionStore groupConnections) { RedisLog.Subscribing(_logger, groupChannel); - var channel = await _bus!.SubscribeAsync(groupChannel); + var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(groupChannel)); channel.OnMessage(async (channelMessage) => { try diff --git a/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs b/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs index 2915168d27c8..c8a71ef2321d 100644 --- a/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs +++ b/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs @@ -149,6 +149,73 @@ public async Task CanSendAndReceiveUserMessagesWhenOneConnectionWithUserDisconne } } + [ConditionalTheory] + [SkipIfDockerNotPresent] + [MemberData(nameof(TransportTypesAndProtocolTypes))] + public async Task HubConnectionCanSendAndReceiveGroupMessagesGroupNameWithPatternIsTreatedAsLiteral(HttpTransportType transportType, string protocolName) + { + using (StartVerifiableLog()) + { + var protocol = HubProtocolHelpers.GetHubProtocol(protocolName); + + var connection = CreateConnection(_serverFixture.FirstServer.Url + "/echo", transportType, protocol, LoggerFactory); + var secondConnection = CreateConnection(_serverFixture.SecondServer.Url + "/echo", transportType, protocol, LoggerFactory); + + var tcs = new TaskCompletionSource(); + connection.On("Echo", message => tcs.TrySetResult(message)); + var tcs2 = new TaskCompletionSource(); + secondConnection.On("Echo", message => tcs2.TrySetResult(message)); + + var groupName = $"TestGroup_{transportType}_{protocolName}_{Guid.NewGuid()}"; + + await secondConnection.StartAsync().DefaultTimeout(); + await connection.StartAsync().DefaultTimeout(); + await connection.InvokeAsync("AddSelfToGroup", "*").DefaultTimeout(); + await secondConnection.InvokeAsync("AddSelfToGroup", groupName).DefaultTimeout(); + await connection.InvokeAsync("EchoGroup", groupName, "Hello, World!").DefaultTimeout(); + + Assert.Equal("Hello, World!", await tcs2.Task.DefaultTimeout()); + Assert.False(tcs.Task.IsCompleted); + + await connection.InvokeAsync("EchoGroup", "*", "Hello, World!").DefaultTimeout(); + Assert.Equal("Hello, World!", await tcs.Task.DefaultTimeout()); + + await connection.DisposeAsync().DefaultTimeout(); + } + } + + [ConditionalTheory] + [SkipIfDockerNotPresent] + [MemberData(nameof(TransportTypesAndProtocolTypes))] + public async Task CanSendAndReceiveUserMessagesUserNameWithPatternIsTreatedAsLiteral(HttpTransportType transportType, string protocolName) + { + using (StartVerifiableLog()) + { + var protocol = HubProtocolHelpers.GetHubProtocol(protocolName); + + var connection = CreateConnection(_serverFixture.FirstServer.Url + "/echo", transportType, protocol, LoggerFactory, userName: "*"); + var secondConnection = CreateConnection(_serverFixture.SecondServer.Url + "/echo", transportType, protocol, LoggerFactory, userName: "userA"); + + var tcs = new TaskCompletionSource(); + connection.On("Echo", message => tcs.TrySetResult(message)); + var tcs2 = new TaskCompletionSource(); + secondConnection.On("Echo", message => tcs2.TrySetResult(message)); + + await secondConnection.StartAsync().DefaultTimeout(); + await connection.StartAsync().DefaultTimeout(); + await connection.InvokeAsync("EchoUser", "userA", "Hello, World!").DefaultTimeout(); + + Assert.Equal("Hello, World!", await tcs2.Task.DefaultTimeout()); + Assert.False(tcs.Task.IsCompleted); + + await connection.InvokeAsync("EchoUser", "*", "Hello, World!").DefaultTimeout(); + Assert.Equal("Hello, World!", await tcs.Task.DefaultTimeout()); + + await connection.DisposeAsync().DefaultTimeout(); + await secondConnection.DisposeAsync().DefaultTimeout(); + } + } + private static HubConnection CreateConnection(string url, HttpTransportType transportType, IHubProtocol protocol, ILoggerFactory loggerFactory, string userName = null) { var hubConnectionBuilder = new HubConnectionBuilder() diff --git a/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs b/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs index 7d9a86ee8c0b..5a399426b7e7 100644 --- a/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs +++ b/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs @@ -83,6 +83,26 @@ public async Task CamelCasedJsonIsPreservedAcrossRedisBoundary() } } + // Smoke test that Debug.Asserts in TestSubscriber aren't hit + [Fact] + public async Task PatternGroupAndUser() + { + var server = new TestRedisServer(); + using (var client = new TestClient()) + { + var manager = CreateLifetimeManager(server); + + var connection = HubConnectionContextUtils.Create(client.Connection); + connection.UserIdentifier = "*"; + + await manager.OnConnectedAsync(connection).DefaultTimeout(); + + var groupName = "*"; + + await manager.AddToGroupAsync(connection.ConnectionId, groupName).DefaultTimeout(); + } + } + public override TestRedisServer CreateBackplane() { return new TestRedisServer(); diff --git a/src/SignalR/server/StackExchangeRedis/test/TestConnectionMultiplexer.cs b/src/SignalR/server/StackExchangeRedis/test/TestConnectionMultiplexer.cs index e68ace5982c2..0e21b56a52b5 100644 --- a/src/SignalR/server/StackExchangeRedis/test/TestConnectionMultiplexer.cs +++ b/src/SignalR/server/StackExchangeRedis/test/TestConnectionMultiplexer.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Net; using System.Reflection; @@ -11,6 +12,7 @@ using System.Threading.Tasks; using StackExchange.Redis; using StackExchange.Redis.Profiling; +using Xunit; namespace Microsoft.AspNetCore.SignalR.Tests { @@ -230,6 +232,8 @@ public class TestRedisServer public long Publish(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None) { + AssertRedisChannel(channel); + if (_subscriptions.TryGetValue(channel, out var handlers)) { foreach (var (_, handler) in handlers) @@ -243,6 +247,8 @@ public long Publish(RedisChannel channel, RedisValue message, CommandFlags flags public void Subscribe(ChannelMessageQueue messageQueue, int subscriberId, CommandFlags flags = CommandFlags.None) { + AssertRedisChannel(messageQueue.Channel); + Action handler = (channel, value) => { // Workaround for https://github.com/StackExchange/StackExchange.Redis/issues/969 @@ -260,11 +266,20 @@ public void Subscribe(ChannelMessageQueue messageQueue, int subscriberId, Comman public void Unsubscribe(RedisChannel channel, int subscriberId, CommandFlags flags = CommandFlags.None) { + AssertRedisChannel(channel); + if (_subscriptions.TryGetValue(channel, out var list)) { list.RemoveAll((item) => item.Item1 == subscriberId); } } + + internal static void AssertRedisChannel(RedisChannel channel) + { + var patternField = typeof(RedisChannel).GetField("IsPatternBased", BindingFlags.NonPublic | BindingFlags.Instance); + Assert.NotNull(patternField); + Assert.False((bool)patternField.GetValue(channel)); + } } public class TestSubscriber : ISubscriber @@ -310,11 +325,15 @@ public Task PingAsync(CommandFlags flags = CommandFlags.None) public long Publish(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None) { + TestRedisServer.AssertRedisChannel(channel); + return _server.Publish(channel, message, flags); } public async Task PublishAsync(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None) { + TestRedisServer.AssertRedisChannel(channel); + await Task.Yield(); return Publish(channel, message, flags); } @@ -326,6 +345,8 @@ public void Subscribe(RedisChannel channel, Action han public Task SubscribeAsync(RedisChannel channel, Action handler, CommandFlags flags = CommandFlags.None) { + TestRedisServer.AssertRedisChannel(channel); + Subscribe(channel, handler, flags); return Task.CompletedTask; } @@ -342,6 +363,8 @@ public bool TryWait(Task task) public void Unsubscribe(RedisChannel channel, Action handler = null, CommandFlags flags = CommandFlags.None) { + TestRedisServer.AssertRedisChannel(channel); + _server.Unsubscribe(channel, _id, flags); } @@ -357,6 +380,8 @@ public Task UnsubscribeAllAsync(CommandFlags flags = CommandFlags.None) public Task UnsubscribeAsync(RedisChannel channel, Action handler = null, CommandFlags flags = CommandFlags.None) { + TestRedisServer.AssertRedisChannel(channel); + Unsubscribe(channel, handler, flags); return Task.CompletedTask; } @@ -391,6 +416,8 @@ public ChannelMessageQueue Subscribe(RedisChannel channel, CommandFlags flags = public Task SubscribeAsync(RedisChannel channel, CommandFlags flags = CommandFlags.None) { + TestRedisServer.AssertRedisChannel(channel); + var t = Subscribe(channel, flags); return Task.FromResult(t); } From 311a4f964c4fc6d9a674e5befcbce30e50bb5e6c Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 11 Jul 2023 03:44:04 +0000 Subject: [PATCH 24/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/NuGet.config b/NuGet.config index eb22c5afdc17..ef73f074be4e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 52a5f4eb7e05..646ddb1307c6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - db1112f52a8581622202f02951e195e57421fc0f + 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - db1112f52a8581622202f02951e195e57421fc0f + 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - db1112f52a8581622202f02951e195e57421fc0f + 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - db1112f52a8581622202f02951e195e57421fc0f + 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - db1112f52a8581622202f02951e195e57421fc0f + 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - db1112f52a8581622202f02951e195e57421fc0f + 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - db1112f52a8581622202f02951e195e57421fc0f + 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - db1112f52a8581622202f02951e195e57421fc0f + 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 999cc24d5443..f6560c1b5fa3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.21 6.0.21 6.0.21 - 6.0.21-servicing.23355.12 + 6.0.21-servicing.23360.16 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.21-servicing.23355.12 + 6.0.21-servicing.23360.16 6.0.1 6.0.0 6.0.2 From bd9651e1c911b9fe17aad4eeb045cd7a9607048e Mon Sep 17 00:00:00 2001 From: wtgodbe Date: Tue, 11 Jul 2023 13:31:20 -0700 Subject: [PATCH 25/83] Update baseline, SDK --- eng/Baseline.Designer.props | 444 ++++++++++++++++++------------------ eng/Baseline.xml | 214 ++++++++--------- eng/Versions.props | 2 +- global.json | 4 +- 4 files changed, 332 insertions(+), 332 deletions(-) diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index 418848176995..ae468b57d8d0 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,28 +2,28 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - - - + + + @@ -34,120 +34,120 @@ - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 @@ -155,114 +155,114 @@ - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - + - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 - + - 6.0.18 + 6.0.20 - - - + + + - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - - + + @@ -270,7 +270,7 @@ - 6.0.18 + 6.0.20 @@ -278,50 +278,50 @@ - 6.0.18 + 6.0.20 - + - + - + - + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - - + + @@ -331,8 +331,8 @@ - - + + @@ -340,8 +340,8 @@ - - + + @@ -352,58 +352,58 @@ - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - + - 6.0.18 + 6.0.20 @@ -411,71 +411,71 @@ - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - + - + - + - + - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 @@ -491,195 +491,195 @@ - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - + - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 - - + + - 6.0.18 + 6.0.20 - + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - + - 6.0.18 + 6.0.20 - - + + - - + + - - + + - 6.0.18 + 6.0.20 - - + + - - + + - - + + - - + + - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - - - - + + + + - 6.0.18 + 6.0.20 @@ -688,69 +688,69 @@ - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - + - 6.0.18 + 6.0.20 - + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 @@ -769,7 +769,7 @@ - 6.0.18 + 6.0.20 @@ -788,7 +788,7 @@ - 6.0.18 + 6.0.20 @@ -804,46 +804,46 @@ - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - - - + + + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 @@ -853,7 +853,7 @@ - 6.0.18 + 6.0.20 @@ -862,73 +862,73 @@ - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - + - + - + - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 @@ -957,11 +957,11 @@ - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 @@ -979,13 +979,13 @@ - 6.0.18 + 6.0.20 - 6.0.18 + 6.0.20 - + \ No newline at end of file diff --git a/eng/Baseline.xml b/eng/Baseline.xml index aafe6208659f..604ee1e588e2 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -4,111 +4,111 @@ This file contains a list of all the packages and their versions which were rele Update this list when preparing for a new patch. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eng/Versions.props b/eng/Versions.props index 9dc73dcfe989..f334f24132ed 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -9,7 +9,7 @@ 6 0 21 - false + true diff --git a/global.json b/global.json index 3e79e2363400..45c422312fd8 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "6.0.118" + "version": "6.0.120" }, "tools": { - "dotnet": "6.0.118", + "dotnet": "6.0.120", "runtimes": { "dotnet/x64": [ "2.1.30", From b7bd64b3744869ecdd1760d40d1f6872494a603d Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 12 Jul 2023 00:34:36 +0000 Subject: [PATCH 26/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-efcore --- NuGet.config | 4 ++-- eng/Version.Details.xml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NuGet.config b/NuGet.config index ef73f074be4e..898e661d5e9a 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,7 +7,7 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 646ddb1307c6..22d4d311255e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -11,35 +11,35 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 54d936f07e28cfd2edda5a53de8e70739f6e9675 + 0d690b8b75b98568908726c87525c6cd4aa00362 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 54d936f07e28cfd2edda5a53de8e70739f6e9675 + 0d690b8b75b98568908726c87525c6cd4aa00362 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 54d936f07e28cfd2edda5a53de8e70739f6e9675 + 0d690b8b75b98568908726c87525c6cd4aa00362 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 54d936f07e28cfd2edda5a53de8e70739f6e9675 + 0d690b8b75b98568908726c87525c6cd4aa00362 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 54d936f07e28cfd2edda5a53de8e70739f6e9675 + 0d690b8b75b98568908726c87525c6cd4aa00362 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 54d936f07e28cfd2edda5a53de8e70739f6e9675 + 0d690b8b75b98568908726c87525c6cd4aa00362 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 54d936f07e28cfd2edda5a53de8e70739f6e9675 + 0d690b8b75b98568908726c87525c6cd4aa00362 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 54d936f07e28cfd2edda5a53de8e70739f6e9675 + 0d690b8b75b98568908726c87525c6cd4aa00362 https://github.com/dotnet/runtime From 4a4d163ac83a4aaa7b795951521d147853fda9fb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 20:50:22 +0000 Subject: [PATCH 27/83] Update dependencies from https://github.com/dotnet/arcade build 20230711.3 (#49369) [release/6.0] Update dependencies from dotnet/arcade --- NuGet.config | 4 ---- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/NuGet.config b/NuGet.config index 5fe2b4af9609..1e2458c409ad 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,8 @@ - - @@ -25,10 +23,8 @@ - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e05d62f7680e..e4e947c9bbb2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -280,22 +280,22 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime a08d9ce2caf02455c0b825bcdc32974bdf769a80 - + https://github.com/dotnet/arcade - 91616785a1a6578c83f7e93d98c34a1eb83d6223 + cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34 - + https://github.com/dotnet/arcade - 91616785a1a6578c83f7e93d98c34a1eb83d6223 + cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34 - + https://github.com/dotnet/arcade - 91616785a1a6578c83f7e93d98c34a1eb83d6223 + cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34 - + https://github.com/dotnet/arcade - 91616785a1a6578c83f7e93d98c34a1eb83d6223 + cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34 diff --git a/eng/Versions.props b/eng/Versions.props index f334f24132ed..e3f38cdfb61a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -131,8 +131,8 @@ 6.0.20 6.0.20 - 6.0.0-beta.23313.5 - 6.0.0-beta.23313.5 + 6.0.0-beta.23361.3 + 6.0.0-beta.23361.3 - 6.0.0-beta.23313.5 - 6.0.0-beta.23313.5 + 6.0.0-beta.23361.3 + 6.0.0-beta.23361.3 - + @@ -25,7 +25,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9a53a0a9992f..c7674040cf9d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -11,35 +11,35 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d690b8b75b98568908726c87525c6cd4aa00362 + fa741b8bad8eebb503bba99e078538f97aff3f5d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d690b8b75b98568908726c87525c6cd4aa00362 + fa741b8bad8eebb503bba99e078538f97aff3f5d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d690b8b75b98568908726c87525c6cd4aa00362 + fa741b8bad8eebb503bba99e078538f97aff3f5d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d690b8b75b98568908726c87525c6cd4aa00362 + fa741b8bad8eebb503bba99e078538f97aff3f5d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d690b8b75b98568908726c87525c6cd4aa00362 + fa741b8bad8eebb503bba99e078538f97aff3f5d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d690b8b75b98568908726c87525c6cd4aa00362 + fa741b8bad8eebb503bba99e078538f97aff3f5d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d690b8b75b98568908726c87525c6cd4aa00362 + fa741b8bad8eebb503bba99e078538f97aff3f5d https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d690b8b75b98568908726c87525c6cd4aa00362 + fa741b8bad8eebb503bba99e078538f97aff3f5d https://github.com/dotnet/runtime From a62c85f2091a3e36e15eb9fb36e0c6806c29c95f Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Fri, 14 Jul 2023 02:14:58 +0000 Subject: [PATCH 30/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 18 +++++++++--------- eng/Versions.props | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/NuGet.config b/NuGet.config index c466d1bd5df3..65bb92f0d5be 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c7674040cf9d..8cf765e85742 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 + e40b3abf1b41621d4298642a5fd300ebf7cccf6d https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 + e40b3abf1b41621d4298642a5fd300ebf7cccf6d https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 + e40b3abf1b41621d4298642a5fd300ebf7cccf6d https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 + e40b3abf1b41621d4298642a5fd300ebf7cccf6d https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 + e40b3abf1b41621d4298642a5fd300ebf7cccf6d https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 + e40b3abf1b41621d4298642a5fd300ebf7cccf6d - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 + e40b3abf1b41621d4298642a5fd300ebf7cccf6d diff --git a/eng/Versions.props b/eng/Versions.props index 1bdf24c11527..9a77756a55fe 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.21 6.0.21 6.0.21 - 6.0.21-servicing.23360.16 + 6.0.21-servicing.23363.11 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.21-servicing.23360.16 + 6.0.21-servicing.23363.11 6.0.1 6.0.0 6.0.2 From cec88a329584349fda070f4c7346b10538210ace Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Sat, 15 Jul 2023 02:24:48 +0000 Subject: [PATCH 31/83] Merged PR 32094: [6.0] Forcibly close socket on abort Forcibly close socket when connection is aborted. --- .../Common.FunctionalTests/ShutdownTests.cs | 7 + .../Core/src/Internal/Http/Http1Connection.cs | 9 +- .../src/Internal/Http/Http1MessageBody.cs | 2 +- .../src/Internal/Http2/Http2Connection.cs | 3 +- .../Kestrel/Core/src/KestrelServerOptions.cs | 11 + .../src/Internal/ILibuvTrace.cs | 2 + .../src/Internal/LibuvConnection.cs | 60 +++- .../src/Internal/LibuvConnectionListener.cs | 26 +- .../src/Internal/LibuvTrace.cs | 3 + .../src/Internal/ListenerContext.cs | 2 +- .../src/Internal/ListenerPrimary.cs | 28 +- .../src/LibuvTransportOptions.cs | 11 + .../test/ListenerPrimaryTests.cs | 182 +++++++++++- .../src/Internal/ISocketsTrace.cs | 1 + .../src/Internal/SocketConnection.cs | 18 +- .../src/Internal/SocketsTrace.cs | 11 + .../src/SocketConnectionContextFactory.cs | 3 +- .../src/SocketConnectionFactoryOptions.cs | 4 + .../src/SocketTransportOptions.cs | 11 + .../shared/test/StreamBackedTestConnection.cs | 2 +- .../test/TransportTestHelpers/TestServer.cs | 7 +- .../FunctionalTests/Http2/ShutdownTests.cs | 53 ++++ .../test/FunctionalTests/RequestTests.cs | 266 ++++++++++++++++-- .../test/FunctionalTests/ResponseTests.cs | 180 +++++++++--- 24 files changed, 811 insertions(+), 91 deletions(-) diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/ShutdownTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/ShutdownTests.cs index 07d723e4da87..ea0bb16a0432 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/ShutdownTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/ShutdownTests.cs @@ -486,8 +486,15 @@ public async Task ClosesConnectionOnServerAbortOutOfProcess() var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue); Assert.Equal(HttpStatusCode.BadGateway, response.StatusCode); + +#if NEWSHIM_FUNCTIONALS + // In-proc SocketConnection isn't used and there's no abort // 0x80072f78 ERROR_HTTP_INVALID_SERVER_RESPONSE The server returned an invalid or unrecognized response Assert.Contains("0x80072f78", await response.Content.ReadAsStringAsync()); +#else + // 0x80072efe ERROR_INTERNET_CONNECTION_ABORTED The connection with the server was terminated abnormally + Assert.Contains("0x80072efe", await response.Content.ReadAsStringAsync()); +#endif } catch (HttpRequestException) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs index ad1ffff50e52..2a5927b901e6 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs @@ -93,7 +93,14 @@ protected override void OnRequestProcessingEnded() _http1Output.Dispose(); } - public void OnInputOrOutputCompleted() + void IRequestProcessor.OnInputOrOutputCompleted() + { + // Closed gracefully. + _http1Output.Abort(ServerOptions.FinOnError ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!); + CancelRequestAbortedToken(); + } + + void IHttpOutputAborter.OnInputOrOutputCompleted() { _http1Output.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient)); CancelRequestAbortedToken(); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs index 5a3051ae56c8..b9711909eb76 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs @@ -207,7 +207,7 @@ protected void ThrowUnexpectedEndOfRequestContent() // so we call OnInputOrOutputCompleted() now to prevent a race in our tests where a 400 // response is written after observing the unexpected end of request content instead of just // closing the connection without a response as expected. - _context.OnInputOrOutputCompleted(); + ((IHttpOutputAborter)_context).OnInputOrOutputCompleted(); KestrelBadHttpRequestException.Throw(RequestRejectionReason.UnexpectedEndOfRequestContent); } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs index b197c7fccb28..ac3e9d166d4d 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs @@ -150,7 +150,8 @@ public Http2Connection(HttpConnectionContext context) public void OnInputOrOutputCompleted() { TryClose(); - _frameWriter.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient)); + var useException = _context.ServiceContext.ServerOptions.FinOnError || _clientActiveStreamCount != 0; + _frameWriter.Abort(useException ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!); } public void Abort(ConnectionAbortedException ex) diff --git a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs index cf930c744cbb..f732302c251f 100644 --- a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs +++ b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs @@ -29,9 +29,20 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core /// public class KestrelServerOptions { + private const string FinOnErrorSwitch = "Microsoft.AspNetCore.Server.Kestrel.FinOnError"; + private static readonly bool _finOnError; + + static KestrelServerOptions() + { + AppContext.TryGetSwitch(FinOnErrorSwitch, out _finOnError); + } + // internal to fast-path header decoding when RequestHeaderEncodingSelector is unchanged. internal static readonly Func DefaultHeaderEncodingSelector = _ => null; + // Opt-out flag for back compat. Remove in 9.0 (or make public). + internal bool FinOnError { get; set; } = _finOnError; + private Func _requestHeaderEncodingSelector = DefaultHeaderEncodingSelector; private Func _responseHeaderEncodingSelector = DefaultHeaderEncodingSelector; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs index 60966046a3a3..260657cff99b 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs @@ -14,6 +14,8 @@ internal interface ILibuvTrace : ILogger void ConnectionWriteFin(string connectionId, string reason); + void ConnectionWriteRst(string connectionId, string reason); + void ConnectionWrite(string connectionId, int count); void ConnectionWriteCallback(string connectionId, int status); diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs index fdfc852ba243..ca163d6d2aff 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs @@ -6,6 +6,8 @@ using System.IO; using System.IO.Pipelines; using System.Net; +using System.Net.Sockets; +using System.Reflection.Metadata; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Connections; @@ -28,6 +30,8 @@ internal partial class LibuvConnection : TransportConnection private readonly IDuplexPipe _originalTransport; private readonly CancellationTokenSource _connectionClosedTokenSource = new CancellationTokenSource(); + private readonly bool _finOnError; + private volatile ConnectionAbortedException _abortReason; private MemoryHandle _bufferHandle; @@ -43,9 +47,11 @@ public LibuvConnection(UvStreamHandle socket, PipeOptions inputOptions = null, PipeOptions outputOptions = null, long? maxReadBufferSize = null, - long? maxWriteBufferSize = null) + long? maxWriteBufferSize = null, + bool finOnError = false) { _socket = socket; + _finOnError = finOnError; LocalEndPoint = localEndPoint; RemoteEndPoint = remoteEndPoint; @@ -124,6 +130,13 @@ private async Task StartCore() { inputError ??= _abortReason ?? new ConnectionAbortedException("The libuv transport's send loop completed gracefully."); + if (!_finOnError && _abortReason is not null) + { + // When shutdown isn't clean (note that we're using _abortReason, rather than inputError, to exclude that case), + // we set the DontLinger socket option to cause libuv to send a RST and release any buffered response data. + SetDontLingerOption(_socket); + } + // Now, complete the input so that no more reads can happen Input.Complete(inputError); Output.Complete(outputError); @@ -132,8 +145,16 @@ private async Task StartCore() // on the stream handle Input.CancelPendingFlush(); - // Send a FIN - Log.ConnectionWriteFin(ConnectionId, inputError.Message); + if (!_finOnError && _abortReason is not null) + { + // Send a RST + Log.ConnectionWriteRst(ConnectionId, inputError.Message); + } + else + { + // Send a FIN + Log.ConnectionWriteFin(ConnectionId, inputError.Message); + } // We're done with the socket now _socket.Dispose(); @@ -150,6 +171,27 @@ private async Task StartCore() } } + /// + /// This should be called on before it is disposed. + /// Both and call dispose but, rather than predict + /// which will do so first (which varies), we make this method idempotent and call it in both. + /// + private static void SetDontLingerOption(UvStreamHandle socket) + { + if (!socket.IsClosed && !socket.IsInvalid) + { + var libuv = socket.Libuv; + var pSocket = IntPtr.Zero; + libuv.uv_fileno(socket, ref pSocket); + + // libuv doesn't expose setsockopt, so we take advantage of the fact that + // Socket already has a PAL + using var managedHandle = new SafeSocketHandle(pSocket, ownsHandle: false); + using var managedSocket = new Socket(managedHandle); + managedSocket.LingerState = new LingerOption(enable: true, seconds: 0); + } + } + public override void Abort(ConnectionAbortedException abortReason) { _abortReason = abortReason; @@ -157,8 +199,16 @@ public override void Abort(ConnectionAbortedException abortReason) // Cancel WriteOutputAsync loop after setting _abortReason. Output.CancelPendingRead(); - // This cancels any pending I/O. - Thread.Post(s => s.Dispose(), _socket); + Thread.Post(static (self) => + { + if (!self._finOnError) + { + SetDontLingerOption(self._socket); + } + + // This cancels any pending I/O. + self._socket.Dispose(); + }, this); } public override async ValueTask DisposeAsync() diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnectionListener.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnectionListener.cs index bdfcc2e65b58..f03f8e603097 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnectionListener.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnectionListener.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Net; using System.Threading; @@ -134,9 +135,24 @@ internal async Task BindAsync() { // TODO: Move thread management to LibuvTransportFactory // TODO: Split endpoint management from thread management + + // When `FinOnError` is false (the default), we need to be able to forcibly abort connections. + // On Windows, libuv 1.10.0 will call `shutdown`, preventing forcible abort, on any socket + // not flagged as `UV_HANDLE_SHARED_TCP_SOCKET`. The only way we've found to cause socket + // to be flagged as `UV_HANDLE_SHARED_TCP_SOCKET` is to share it across a named pipe (which + // must, itself, be flagged `ipc`), which naturally happens when a `ListenerPrimary` dispatches + // a connection to a `ListenerSecondary`. Therefore, in scenarios where this is required, we + // tell the `ListenerPrimary` to dispatch *all* connections to secondary and create an + // additional `ListenerSecondary` to replace the lost capacity. + var dispatchAllToSecondary = Libuv.IsWindows && !TransportContext.Options.FinOnError; + #pragma warning disable CS0618 - for (var index = 0; index < TransportOptions.ThreadCount; index++) + var threadCount = dispatchAllToSecondary + ? TransportOptions.ThreadCount + 1 + : TransportOptions.ThreadCount; #pragma warning restore CS0618 + + for (var index = 0; index < threadCount; index++) { Threads.Add(new LibuvThread(Libuv, TransportContext)); } @@ -148,10 +164,10 @@ internal async Task BindAsync() try { -#pragma warning disable CS0618 - if (TransportOptions.ThreadCount == 1) -#pragma warning restore CS0618 + if (threadCount == 1) { + Debug.Assert(!dispatchAllToSecondary, "Should have taken the primary/secondary code path"); + var listener = new Listener(TransportContext); _listeners.Add(listener); await listener.StartAsync(EndPoint, Threads[0]).ConfigureAwait(false); @@ -162,7 +178,7 @@ internal async Task BindAsync() var pipeName = (Libuv.IsWindows ? @"\\.\pipe\kestrel_" : "/tmp/kestrel_") + Guid.NewGuid().ToString("n"); var pipeMessage = Guid.NewGuid().ToByteArray(); - var listenerPrimary = new ListenerPrimary(TransportContext); + var listenerPrimary = new ListenerPrimary(TransportContext, dispatchAllToSecondary); _listeners.Add(listenerPrimary); await listenerPrimary.StartAsync(pipeName, pipeMessage, EndPoint, Threads[0]).ConfigureAwait(false); EndPoint = listenerPrimary.EndPoint; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs index f4e4d64aafff..c360efc7bf93 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs @@ -27,6 +27,9 @@ public void ConnectionRead(string connectionId, int count) [LoggerMessage(7, LogLevel.Debug, @"Connection id ""{ConnectionId}"" sending FIN because: ""{Reason}""", EventName = nameof(ConnectionWriteFin))] public partial void ConnectionWriteFin(string connectionId, string reason); + [LoggerMessage(8, LogLevel.Debug, @"Connection id ""{ConnectionId}"" sending RST because: ""{Reason}""", EventName = nameof(ConnectionWriteRst))] + public partial void ConnectionWriteRst(string connectionId, string reason); + public void ConnectionWrite(string connectionId, int count) { // Don't log for now since this could be *too* verbose. diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs index 7ad346f6ea59..8ab2f5f34503 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs @@ -110,7 +110,7 @@ protected internal void HandleConnection(UvStreamHandle socket) var options = TransportContext.Options; #pragma warning disable CS0618 - var connection = new LibuvConnection(socket, TransportContext.Log, Thread, remoteEndPoint, localEndPoint, InputOptions, OutputOptions, options.MaxReadBufferSize, options.MaxWriteBufferSize); + var connection = new LibuvConnection(socket, TransportContext.Log, Thread, remoteEndPoint, localEndPoint, InputOptions, OutputOptions, options.MaxReadBufferSize, options.MaxWriteBufferSize, options.FinOnError); #pragma warning restore CS0618 connection.Start(); diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs index 8a899c91c44e..18ae24af5adb 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Net; using System.Runtime.InteropServices; @@ -22,6 +23,10 @@ internal class ListenerPrimary : Listener private readonly List _dispatchPipes = new List(); // The list of pipes we've created but may not be part of _dispatchPipes private readonly List _createdPipes = new List(); + + // If true, dispatch all connections to _dispatchPipes - don't process any in the primary + private readonly bool _dispatchAll; + private int _dispatchIndex; private string _pipeName; private byte[] _pipeMessage; @@ -32,8 +37,9 @@ internal class ListenerPrimary : Listener // but it has no other functional significance private readonly ArraySegment> _dummyMessage = new ArraySegment>(new[] { new ArraySegment(new byte[] { 1, 2, 3, 4 }) }); - public ListenerPrimary(LibuvTransportContext transportContext) : base(transportContext) + public ListenerPrimary(LibuvTransportContext transportContext, bool dispatchAll) : base(transportContext) { + _dispatchAll = dispatchAll; } /// @@ -107,9 +113,27 @@ private void OnListenPipe(UvStreamHandle pipe, int status, UvException error) protected override void DispatchConnection(UvStreamHandle socket) { - var index = _dispatchIndex++ % (_dispatchPipes.Count + 1); + var modulus = _dispatchAll ? _dispatchPipes.Count : (_dispatchPipes.Count + 1); + if (modulus == 0) + { + if (_createdPipes.Count == 0) + { +#pragma warning disable CS0618 // Type or member is obsolete + Log.LogError(0, $"Connection received before listeners were initialized - see https://aka.ms/dotnet/aspnet/finonerror for possible mitigations"); +#pragma warning restore CS0618 // Type or member is obsolete + } + else + { + Log.LogError(0, "Unable to process connection since listeners failed to initialize - see https://aka.ms/dotnet/aspnet/finonerror for possible mitigations"); + } + + return; + } + + var index = _dispatchIndex++ % modulus; if (index == _dispatchPipes.Count) { + Debug.Assert(!_dispatchAll, "Should have dispatched to a secondary listener"); base.DispatchConnection(socket); } else diff --git a/src/Servers/Kestrel/Transport.Libuv/src/LibuvTransportOptions.cs b/src/Servers/Kestrel/Transport.Libuv/src/LibuvTransportOptions.cs index 142a2f99c4ce..9e58ac1a2d7a 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/LibuvTransportOptions.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/LibuvTransportOptions.cs @@ -12,6 +12,17 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv [Obsolete("The libuv transport is obsolete and will be removed in a future release. See https://aka.ms/libuvtransport for details.", error: false)] // Remove after .NET 6. public class LibuvTransportOptions { + private const string FinOnErrorSwitch = "Microsoft.AspNetCore.Server.Kestrel.FinOnError"; + private static readonly bool _finOnError; + + static LibuvTransportOptions() + { + AppContext.TryGetSwitch(FinOnErrorSwitch, out _finOnError); + } + + // Opt-out flag for back compat. Remove in 7.0. + internal bool FinOnError { get; set; } = _finOnError; + /// /// The number of libuv I/O threads used to process requests. /// diff --git a/src/Servers/Kestrel/Transport.Libuv/test/ListenerPrimaryTests.cs b/src/Servers/Kestrel/Transport.Libuv/test/ListenerPrimaryTests.cs index 82d04cd1ac14..58d57451490e 100644 --- a/src/Servers/Kestrel/Transport.Libuv/test/ListenerPrimaryTests.cs +++ b/src/Servers/Kestrel/Transport.Libuv/test/ListenerPrimaryTests.cs @@ -5,11 +5,14 @@ using System.IO; using System.Linq; using System.Net; +using System.Net.Sockets; +using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal; using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking; using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.TestHelpers; using Microsoft.AspNetCore.Testing; +using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Xunit; @@ -33,7 +36,7 @@ public async Task ConnectionsGetRoundRobinedToSecondaryListeners() // Start primary listener var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary); await libuvThreadPrimary.StartAsync(); - var listenerPrimary = new ListenerPrimary(transportContextPrimary); + var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: false); await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary); var address = GetUri(listenerPrimary.EndPoint); @@ -50,6 +53,8 @@ public async Task ConnectionsGetRoundRobinedToSecondaryListeners() } var listenerCount = listenerPrimary.UvPipeCount; + Assert.Equal(0, listenerCount); + // Add secondary listener var libuvThreadSecondary = new LibuvThread(libuv, transportContextSecondary); await libuvThreadSecondary.StartAsync(); @@ -85,6 +90,74 @@ public async Task ConnectionsGetRoundRobinedToSecondaryListeners() await listenerPrimary.DisposeAsync(); await libuvThreadPrimary.StopAsync(TimeSpan.FromSeconds(5)); } + [Theory] + [InlineData(1)] + [InlineData(2)] + [InlineData(3)] + public async Task ConnectionsGetRoundRobinedToSecondaryListeners_DispatchAll(int secondaryCount) + { + var libuv = new LibuvFunctions(); + + var endpoint = new IPEndPoint(IPAddress.Loopback, 0); + + var transportContextPrimary = new TestLibuvTransportContext(); + var transportContextSecondary = new TestLibuvTransportContext(); + + var pipeName = (libuv.IsWindows ? @"\\.\pipe\kestrel_" : "/tmp/kestrel_") + Guid.NewGuid().ToString("n"); + var pipeMessage = Guid.NewGuid().ToByteArray(); + + // Start primary listener + var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary); + await libuvThreadPrimary.StartAsync(); + var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: true); + await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary); + var address = GetUri(listenerPrimary.EndPoint); + + Assert.Equal(0, listenerPrimary.UvPipeCount); + + // Add secondary listeners + var listenerSecondaries = new ListenerSecondary[secondaryCount]; + for (int i = 0; i < secondaryCount; i++) + { + var libuvThread = new LibuvThread(libuv, transportContextSecondary); + await libuvThread.StartAsync(); + var listener = new ListenerSecondary(transportContextSecondary); + await listener.StartAsync(pipeName, pipeMessage, endpoint, libuvThread); + listenerSecondaries[i] = listener; + } + + var maxWait = Task.Delay(TestConstants.DefaultTimeout); + // wait for ListenerPrimary.ReadCallback to add the secondary pipe + while (listenerPrimary.UvPipeCount < secondaryCount) + { + var completed = await Task.WhenAny(maxWait, Task.Delay(100)); + if (ReferenceEquals(completed, maxWait)) + { + throw new TimeoutException("Timed out waiting for secondary listener to become available"); + } + } + + // Check that the secondaries are visited in order and that it wraps + // around without hitting the primary + for (int i = 0; i < secondaryCount + 1; i++) + { + var expectedTask = listenerSecondaries[i % secondaryCount].AcceptAsync().AsTask(); + + using var socket = await HttpClientSlim.GetSocket(address); + + await using var connection = await expectedTask.DefaultTimeout(); + } + + foreach (var listenerSecondary in listenerSecondaries) + { + var libuvThread = listenerSecondary.Thread; + await listenerSecondary.DisposeAsync(); + await libuvThread.StopAsync(TimeSpan.FromSeconds(5)); + } + + await listenerPrimary.DisposeAsync(); + await libuvThreadPrimary.StopAsync(TimeSpan.FromSeconds(5)); + } // https://github.com/aspnet/KestrelHttpServer/issues/1182 [Fact] @@ -103,7 +176,7 @@ public async Task NonListenerPipeConnectionsAreLoggedAndIgnored() // Start primary listener var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary); await libuvThreadPrimary.StartAsync(); - var listenerPrimary = new ListenerPrimary(transportContextPrimary); + var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: false); await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary); var address = GetUri(listenerPrimary.EndPoint); @@ -181,7 +254,6 @@ public async Task NonListenerPipeConnectionsAreLoggedAndIgnored() Assert.Equal(LogLevel.Debug, logMessage.LogLevel); } - [Fact] public async Task PipeConnectionsWithWrongMessageAreLoggedAndIgnored() { @@ -199,7 +271,7 @@ public async Task PipeConnectionsWithWrongMessageAreLoggedAndIgnored() // Start primary listener var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary); await libuvThreadPrimary.StartAsync(); - var listenerPrimary = new ListenerPrimary(transportContextPrimary); + var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: false); await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary); var address = GetUri(listenerPrimary.EndPoint); @@ -235,6 +307,108 @@ public async Task PipeConnectionsWithWrongMessageAreLoggedAndIgnored() Assert.Contains("Bad data", errorMessage.Exception.ToString()); } + [Fact] + public async Task PipeConnectionsWithWrongMessageAreLoggedAndIgnored_DispatchAllNoneRemaining() + { + var libuv = new LibuvFunctions(); + var endpoint = new IPEndPoint(IPAddress.Loopback, 0); + + var logger = new TestApplicationErrorLogger(); + + var transportContextPrimary = new TestLibuvTransportContext { Log = new LibuvTrace(logger) }; + var transportContextSecondary = new TestLibuvTransportContext(); + + var pipeName = (libuv.IsWindows ? @"\\.\pipe\kestrel_" : "/tmp/kestrel_") + Guid.NewGuid().ToString("n"); + var pipeMessage = Guid.NewGuid().ToByteArray(); + + // Start primary listener + var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary); + await libuvThreadPrimary.StartAsync(); + var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: true); + await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary); + var address = GetUri(listenerPrimary.EndPoint); + + // Add secondary listener with wrong pipe message + var libuvThreadSecondary = new LibuvThread(libuv, transportContextSecondary); + await libuvThreadSecondary.StartAsync(); + var listenerSecondary = new ListenerSecondary(transportContextSecondary); + await listenerSecondary.StartAsync(pipeName, Guid.NewGuid().ToByteArray(), endpoint, libuvThreadSecondary); + + // Wait up to 10 seconds for error to be logged + for (var i = 0; i < 10 && logger.TotalErrorsLogged == 0; i++) + { + await Task.Delay(100); + } + + Assert.Equal(1, logger.TotalErrorsLogged); + + var badDataMessage = Assert.Single(logger.Messages.Where(m => m.LogLevel == LogLevel.Error)); + Assert.IsType(badDataMessage.Exception); + Assert.Contains("Bad data", badDataMessage.Exception.ToString()); + + using var socket = await HttpClientSlim.GetSocket(address); + + var _ = listenerPrimary.AcceptAsync(); + + // Wait up to 10 seconds for error to be logged + for (var i = 0; i < 10 && logger.TotalErrorsLogged <= 1; i++) + { + await Task.Delay(100); + } + + var noSecondariesMessage = logger.Messages.Last(m => m.LogLevel == LogLevel.Error); + Assert.Null(noSecondariesMessage.Exception); + Assert.Contains("listeners failed to initialize", noSecondariesMessage.Message); + + Assert.Null(libuvThreadPrimary.FatalError); + + await listenerSecondary.DisposeAsync(); + await libuvThreadSecondary.StopAsync(TimeSpan.FromSeconds(5)); + + await listenerPrimary.DisposeAsync(); + await libuvThreadPrimary.StopAsync(TimeSpan.FromSeconds(5)); + } + + [Fact] + public async Task DispatchAllConnectionBeforeSecondaries() + { + var libuv = new LibuvFunctions(); + var endpoint = new IPEndPoint(IPAddress.Loopback, 0); + + var logger = new TestApplicationErrorLogger(); + + var transportContextPrimary = new TestLibuvTransportContext { Log = new LibuvTrace(logger) }; + var transportContextSecondary = new TestLibuvTransportContext(); + + var pipeName = (libuv.IsWindows ? @"\\.\pipe\kestrel_" : "/tmp/kestrel_") + Guid.NewGuid().ToString("n"); + var pipeMessage = Guid.NewGuid().ToByteArray(); + + // Start primary listener + var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary); + await libuvThreadPrimary.StartAsync(); + var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: true); + await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary); + var address = GetUri(listenerPrimary.EndPoint); + + using var socket = await HttpClientSlim.GetSocket(address); + + var _ = listenerPrimary.AcceptAsync(); + + // Wait up to 10 seconds for error to be logged + for (var i = 0; i < 10 && logger.TotalErrorsLogged <= 1; i++) + { + await Task.Delay(100); + } + + var noSecondariesMessage = logger.Messages.Last(m => m.LogLevel == LogLevel.Error); + Assert.Null(noSecondariesMessage.Exception); + Assert.Contains("before listeners", noSecondariesMessage.Message); + + Assert.Null(libuvThreadPrimary.FatalError); + + await listenerPrimary.DisposeAsync(); + await libuvThreadPrimary.StopAsync(TimeSpan.FromSeconds(5)); + } private static async Task AssertRoundRobin(Uri address, ListenerPrimary listenerPrimary, ListenerSecondary listenerSecondary, ListenerContext currentListener, Task expected = null, int connections = 4) { diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Internal/ISocketsTrace.cs b/src/Servers/Kestrel/Transport.Sockets/src/Internal/ISocketsTrace.cs index f5e5c4963786..cdd82f481e8f 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/Internal/ISocketsTrace.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/Internal/ISocketsTrace.cs @@ -11,6 +11,7 @@ internal interface ISocketsTrace : ILogger void ConnectionReadFin(SocketConnection connection); void ConnectionWriteFin(SocketConnection connection, string reason); + void ConnectionWriteRst(SocketConnection connection, string reason); void ConnectionError(SocketConnection connection, Exception ex); diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs b/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs index f43c2e1454f1..c7f58a128a82 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs @@ -10,6 +10,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal { + internal sealed partial class SocketConnection : TransportConnection { private static readonly int MinAllocBufferSize = PinnedBlockMemoryPool.BlockSize / 2; @@ -30,6 +31,7 @@ internal sealed partial class SocketConnection : TransportConnection private readonly TaskCompletionSource _waitForConnectionClosedTcs = new TaskCompletionSource(); private bool _connectionClosed; private readonly bool _waitForData; + private readonly bool _finOnError; internal SocketConnection(Socket socket, MemoryPool memoryPool, @@ -38,7 +40,8 @@ internal SocketConnection(Socket socket, SocketSenderPool socketSenderPool, PipeOptions inputOptions, PipeOptions outputOptions, - bool waitForData = true) + bool waitForData = true, + bool finOnError = false) { Debug.Assert(socket != null); Debug.Assert(memoryPool != null); @@ -49,6 +52,7 @@ internal SocketConnection(Socket socket, _trace = trace; _waitForData = waitForData; _socketSenderPool = socketSenderPool; + _finOnError = finOnError; LocalEndPoint = _socket.LocalEndPoint; RemoteEndPoint = _socket.RemoteEndPoint; @@ -329,11 +333,21 @@ private void Shutdown(Exception? shutdownReason) // ever observe the nondescript ConnectionAbortedException except for connection middleware attempting // to half close the connection which is currently unsupported. _shutdownReason = shutdownReason ?? new ConnectionAbortedException("The Socket transport's send loop completed gracefully."); + + // NB: not _shutdownReason since we don't want to do this on graceful completion + if (!_finOnError && shutdownReason is not null) + { + _trace.ConnectionWriteRst(this, shutdownReason.Message); + + // This forces an abortive close with linger time 0 (and implies Dispose) + _socket.Close(timeout: 0); + return; + } + _trace.ConnectionWriteFin(this, _shutdownReason.Message); try { - // Try to gracefully close the socket even for aborts to match libuv behavior. _socket.Shutdown(SocketShutdown.Both); } catch diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketsTrace.cs b/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketsTrace.cs index 1a48fa189a15..f4108eae678a 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketsTrace.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketsTrace.cs @@ -43,6 +43,17 @@ public void ConnectionWriteFin(SocketConnection connection, string reason) } } + [LoggerMessage(8, LogLevel.Debug, @"Connection id ""{ConnectionId}"" sending RST because: ""{Reason}""", EventName = "ConnectionWriteRst", SkipEnabledCheck = true)] + private static partial void ConnectionWriteRst(ILogger logger, string connectionId, string reason); + + public void ConnectionWriteRst(SocketConnection connection, string reason) + { + if (_logger.IsEnabled(LogLevel.Debug)) + { + ConnectionWriteRst(_logger, connection.ConnectionId, reason); + } + } + public void ConnectionWrite(SocketConnection connection, int count) { // Don't log for now since this could be *too* verbose. diff --git a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionContextFactory.cs b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionContextFactory.cs index 71f3cdc0fc0c..2635af9792d7 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionContextFactory.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionContextFactory.cs @@ -104,7 +104,8 @@ public ConnectionContext Create(Socket socket) setting.SocketSenderPool, setting.InputOptions, setting.OutputOptions, - waitForData: _options.WaitForDataBeforeAllocatingBuffer); + waitForData: _options.WaitForDataBeforeAllocatingBuffer, + finOnError: _options.FinOnError); connection.Start(); return connection; diff --git a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs index d0c88c0535f3..fec0b3bef938 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs @@ -23,8 +23,12 @@ internal SocketConnectionFactoryOptions(SocketTransportOptions transportOptions) MaxWriteBufferSize = transportOptions.MaxWriteBufferSize; UnsafePreferInlineScheduling = transportOptions.UnsafePreferInlineScheduling; MemoryPoolFactory = transportOptions.MemoryPoolFactory; + FinOnError = transportOptions.FinOnError; } + // Opt-out flag for back compat. Remove in 9.0 (or make public). + internal bool FinOnError { get; set; } + /// /// The number of I/O queues used to process requests. Set to 0 to directly schedule I/O to the ThreadPool. /// diff --git a/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs b/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs index 9130cb980454..4f22c079dc1f 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs @@ -13,6 +13,17 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets /// public class SocketTransportOptions { + private const string FinOnErrorSwitch = "Microsoft.AspNetCore.Server.Kestrel.FinOnError"; + private static readonly bool _finOnError; + + static SocketTransportOptions() + { + AppContext.TryGetSwitch(FinOnErrorSwitch, out _finOnError); + } + + // Opt-out flag for back compat. Remove in 9.0 (or make public). + internal bool FinOnError { get; set; } = _finOnError; + /// /// The number of I/O queues used to process requests. Set to 0 to directly schedule I/O to the ThreadPool. /// diff --git a/src/Servers/Kestrel/shared/test/StreamBackedTestConnection.cs b/src/Servers/Kestrel/shared/test/StreamBackedTestConnection.cs index 5dd91c4337d9..eb4f310e7a29 100644 --- a/src/Servers/Kestrel/shared/test/StreamBackedTestConnection.cs +++ b/src/Servers/Kestrel/shared/test/StreamBackedTestConnection.cs @@ -138,7 +138,7 @@ public async Task ReceiveEnd(params string[] lines) public async Task WaitForConnectionClose() { var buffer = new byte[128]; - var bytesTransferred = await _stream.ReadAsync(buffer, 0, 128).TimeoutAfter(Timeout); + var bytesTransferred = await _stream.ReadAsync(buffer, 0, 128).ContinueWith(t => t.IsFaulted ? 0 : t.Result).TimeoutAfter(Timeout); if (bytesTransferred > 0) { diff --git a/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs b/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs index 79fc65849640..0c8109cb9952 100644 --- a/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs +++ b/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs @@ -48,7 +48,7 @@ public TestServer(RequestDelegate app, TestServiceContext context, ListenOptions { } - public TestServer(RequestDelegate app, TestServiceContext context, Action configureListenOptions) + public TestServer(RequestDelegate app, TestServiceContext context, Action configureListenOptions, Action configureServices = null) : this(app, context, options => { var listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0)) @@ -57,7 +57,10 @@ public TestServer(RequestDelegate app, TestServiceContext context, Action { }) + }, s => + { + configureServices?.Invoke(s); + }) { } diff --git a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs index 1a12f4629e44..ff5f06ea21a5 100644 --- a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs +++ b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs @@ -46,6 +46,59 @@ public ShutdownTests() }; } + [ConditionalFact] + public async Task ConnectionClosedWithoutActiveRequestsOrGoAwayFIN() + { + var connectionClosed = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var readFin = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var writeFin = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + + TestSink.MessageLogged += context => + { + if (context.EventId.Name == "Http2ConnectionClosed") + { + connectionClosed.SetResult(); + } + else if (context.EventId.Name == "ConnectionReadFin") + { + readFin.SetResult(); + } + else if (context.EventId.Name == "ConnectionWriteFin") + { + writeFin.SetResult(); + } + }; + + var testContext = new TestServiceContext(LoggerFactory); + + testContext.InitializeHeartbeat(); + + await using (var server = new TestServer(context => + { + return context.Response.WriteAsync("hello world " + context.Request.Protocol); + }, + testContext, + kestrelOptions => + { + kestrelOptions.Listen(IPAddress.Loopback, 0, listenOptions => + { + listenOptions.Protocols = HttpProtocols.Http2; + listenOptions.UseHttps(_x509Certificate2); + }); + })) + { + var response = await Client.GetStringAsync($"https://localhost:{server.Port}/"); + Assert.Equal("hello world HTTP/2", response); + Client.Dispose(); // Close the socket, no GoAway is sent. + + await readFin.Task.DefaultTimeout(); + await writeFin.Task.DefaultTimeout(); + await connectionClosed.Task.DefaultTimeout(); + + await server.StopAsync(); + } + } + [CollectDump] [ConditionalFact] public async Task GracefulShutdownWaitsForRequestsToFinish() diff --git a/src/Servers/Kestrel/test/FunctionalTests/RequestTests.cs b/src/Servers/Kestrel/test/FunctionalTests/RequestTests.cs index e10a5dc3ad3d..af391389ade3 100644 --- a/src/Servers/Kestrel/test/FunctionalTests/RequestTests.cs +++ b/src/Servers/Kestrel/test/FunctionalTests/RequestTests.cs @@ -21,7 +21,13 @@ using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.Server.Kestrel.FunctionalTests; +#if LIBUV +using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv; +#elif SOCKETS +using Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets; +#endif using Microsoft.AspNetCore.Testing; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Moq; @@ -40,6 +46,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests public class RequestTests : LoggedTest { private const int _connectionStartedEventId = 1; + private const int _connectionReadFinEventId = 6; private const int _connectionResetEventId = 19; private static readonly int _semaphoreWaitTimeout = Debugger.IsAttached ? 10000 : 2500; @@ -234,6 +241,59 @@ await connection2.Receive($"HTTP/1.1 200 OK", } } + [Fact] + public async Task ConnectionClosedPriorToRequestIsLoggedAsDebug() + { + var connectionStarted = new SemaphoreSlim(0); + var connectionReadFin = new SemaphoreSlim(0); + var loggedHigherThanDebug = false; + + TestSink.MessageLogged += context => + { + if (context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel" && + context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel.Connections" && + context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" && + context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets") + { + return; + } + + if (context.EventId.Id == _connectionStartedEventId) + { + connectionStarted.Release(); + } + else if (context.EventId.Id == _connectionReadFinEventId) + { + connectionReadFin.Release(); + } + + if (context.LogLevel > LogLevel.Debug) + { + loggedHigherThanDebug = true; + } + }; + + await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory))) + { + using (var connection = server.CreateConnection()) + { + // Wait until connection is established + Assert.True(await connectionStarted.WaitAsync(TestConstants.DefaultTimeout)); + + connection.ShutdownSend(); + + // If the reset is correctly logged as Debug, the wait below should complete shortly. + // This check MUST come before disposing the server, otherwise there's a race where the RST + // is still in flight when the connection is aborted, leading to the reset never being received + // and therefore not logged. + Assert.True(await connectionReadFin.WaitAsync(TestConstants.DefaultTimeout)); + await connection.ReceiveEnd(); + } + } + + Assert.False(loggedHigherThanDebug); + } + [Fact] public async Task ConnectionResetPriorToRequestIsLoggedAsDebug() { @@ -286,6 +346,66 @@ public async Task ConnectionResetPriorToRequestIsLoggedAsDebug() Assert.False(loggedHigherThanDebug); } + [Fact] + public async Task ConnectionClosedBetweenRequestsIsLoggedAsDebug() + { + var connectionReadFin = new SemaphoreSlim(0); + var loggedHigherThanDebug = false; + + TestSink.MessageLogged += context => + { + if (context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel" && + context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" && + context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets") + { + return; + } + + if (context.LogLevel > LogLevel.Debug) + { + loggedHigherThanDebug = true; + } + + if (context.EventId.Id == _connectionReadFinEventId) + { + connectionReadFin.Release(); + } + }; + + await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory))) + { + using (var connection = server.CreateConnection()) + { + await connection.Send( + "GET / HTTP/1.1", + "Host:", + "", + ""); + + // Make sure the response is fully received, so a write failure (e.g. EPIPE) doesn't cause + // a more critical log message. + await connection.Receive( + "HTTP/1.1 200 OK", + "Content-Length: 0", + $"Date: {server.Context.DateHeaderValue}", + "", + ""); + + connection.ShutdownSend(); + + // If the reset is correctly logged as Debug, the wait below should complete shortly. + // This check MUST come before disposing the server, otherwise there's a race where the RST + // is still in flight when the connection is aborted, leading to the reset never being received + // and therefore not logged. + Assert.True(await connectionReadFin.WaitAsync(TestConstants.DefaultTimeout)); + + await connection.ReceiveEnd(); + } + } + + Assert.False(loggedHigherThanDebug); + } + [Fact] public async Task ConnectionResetBetweenRequestsIsLoggedAsDebug() { @@ -345,10 +465,13 @@ await connection.Receive( Assert.False(loggedHigherThanDebug); } - [Fact] - public async Task ConnectionResetMidRequestIsLoggedAsDebug() + [Theory] + [InlineData(true)] + [InlineData(false)] + public async Task ConnectionClosedOrResetMidRequestIsLoggedAsDebug(bool close) { var requestStarted = new SemaphoreSlim(0); + var connectionReadFin = new SemaphoreSlim(0); var connectionReset = new SemaphoreSlim(0); var connectionClosing = new SemaphoreSlim(0); var loggedHigherThanDebug = false; @@ -367,6 +490,11 @@ public async Task ConnectionResetMidRequestIsLoggedAsDebug() loggedHigherThanDebug = true; } + if (context.EventId.Id == _connectionReadFinEventId) + { + connectionReadFin.Release(); + } + if (context.EventId.Id == _connectionResetEventId) { connectionReset.Release(); @@ -387,15 +515,23 @@ public async Task ConnectionResetMidRequestIsLoggedAsDebug() // Wait until connection is established Assert.True(await requestStarted.WaitAsync(TestConstants.DefaultTimeout), "request should have started"); - connection.Reset(); - } + if (close) + { + connection.ShutdownSend(); + Assert.True(await connectionReadFin.WaitAsync(TestConstants.DefaultTimeout), "Connection close event should have been logged"); + } + else + { + connection.Reset(); - // If the reset is correctly logged as Debug, the wait below should complete shortly. - // This check MUST come before disposing the server, otherwise there's a race where the RST - // is still in flight when the connection is aborted, leading to the reset never being received - // and therefore not logged. - Assert.True(await connectionReset.WaitAsync(TestConstants.DefaultTimeout), "Connection reset event should have been logged"); - connectionClosing.Release(); + // If the reset is correctly logged as Debug, the wait below should complete shortly. + // This check MUST come before disposing the server, otherwise there's a race where the RST + // is still in flight when the connection is aborted, leading to the reset never being received + // and therefore not logged. + Assert.True(await connectionReset.WaitAsync(TestConstants.DefaultTimeout), "Connection reset event should have been logged"); + } + connectionClosing.Release(); + } } Assert.False(loggedHigherThanDebug, "Logged event should not have been higher than debug."); @@ -494,18 +630,43 @@ public async Task RequestAbortedTokenFiredOnClientFIN() } } - [Fact] - public async Task AbortingTheConnectionSendsFIN() + [Theory] +#if LIBUV + [InlineData(true, 1)] + [InlineData(false, 1)] + [InlineData(true, 2)] + [InlineData(false, 2)] + public async Task AbortingTheConnection(bool fin, int threadCount) +#else + [InlineData(true)] + [InlineData(false)] + public async Task AbortingTheConnection(bool fin) +#endif { + var connectionAborted = new SemaphoreSlim(0); + var builder = TransportSelector.GetHostBuilder() +#if LIBUV + .ConfigureServices(services => + { +#pragma warning disable CS0618 // Type or member is obsolete + services.Configure(options => + { + options.ThreadCount = threadCount; + }); +#pragma warning restore CS0618 // Type or member is obsolete + }) +#endif .ConfigureWebHost(webHostBuilder => { webHostBuilder + .ConfigureServices(s => SetFinOnError(s, fin)) .UseKestrel() .UseUrls("http://127.0.0.1:0") .Configure(app => app.Run(context => { context.Abort(); + connectionAborted.Release(); return Task.CompletedTask; })); }) @@ -519,8 +680,18 @@ public async Task AbortingTheConnectionSendsFIN() { socket.Connect(new IPEndPoint(IPAddress.Loopback, host.GetPort())); socket.Send(Encoding.ASCII.GetBytes("GET / HTTP/1.1\r\nHost:\r\n\r\n")); - int result = socket.Receive(new byte[32]); - Assert.Equal(0, result); + + Assert.True(await connectionAborted.WaitAsync(_semaphoreWaitTimeout)); + + if (fin) + { + int result = socket.Receive(new byte[32]); + Assert.Equal(0, result); + } + else + { + Assert.Throws(() => socket.Receive(new byte[32])); + } } await host.StopAsync(); @@ -731,16 +902,21 @@ await connection.Send("POST / HTTP/1.1", } [Theory] - [MemberData(nameof(ConnectionMiddlewareDataName))] - public async Task ServerCanAbortConnectionAfterUnobservedClose(string listenOptionsName) + [InlineData("Loopback", true)] + [InlineData("PassThrough", true)] + [InlineData("Loopback", false)] + [InlineData("PassThrough", false)] + public async Task ServerCanAbortConnectionAfterUnobservedClose(string listenOptionsName, bool fin) { const int connectionPausedEventId = 4; const int connectionFinSentEventId = 7; + const int connectionRstSentEventId = 8; const int maxRequestBufferSize = 4096; var readCallbackUnwired = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var clientClosedConnection = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - var serverClosedConnection = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var serverFinConnection = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var serverRstConnection = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var appFuncCompleted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); TestSink.MessageLogged += context => @@ -757,7 +933,11 @@ public async Task ServerCanAbortConnectionAfterUnobservedClose(string listenOpti } else if (context.EventId == connectionFinSentEventId) { - serverClosedConnection.SetResult(); + serverFinConnection.SetResult(); + } + else if (context.EventId == connectionRstSentEventId) + { + serverRstConnection.SetResult(); } }; @@ -766,6 +946,7 @@ public async Task ServerCanAbortConnectionAfterUnobservedClose(string listenOpti { ServerOptions = { + FinOnError = fin, Limits = { MaxRequestBufferSize = maxRequestBufferSize, @@ -783,10 +964,24 @@ public async Task ServerCanAbortConnectionAfterUnobservedClose(string listenOpti context.Abort(); - await serverClosedConnection.Task; + if (fin) + { + await serverFinConnection.Task.DefaultTimeout(); + } + else + { + await serverRstConnection.Task.DefaultTimeout(); + } appFuncCompleted.SetResult(); - }, testContext, ConnectionMiddlewareData[listenOptionsName]())) + }, testContext, listen => + { + if (listenOptionsName == "PassThrough") + { + listen.UsePassThrough(); + } + }, + services => SetFinOnError(services, fin))) { using (var connection = server.CreateConnection()) { @@ -956,21 +1151,21 @@ await context.Response.WriteAsync(JsonConvert.SerializeObject(new private static async Task AssertStreamContains(Stream stream, string expectedSubstring) { var expectedBytes = Encoding.ASCII.GetBytes(expectedSubstring); - var exptectedLength = expectedBytes.Length; - var responseBuffer = new byte[exptectedLength]; + var expectedLength = expectedBytes.Length; + var responseBuffer = new byte[expectedLength]; var matchedChars = 0; - while (matchedChars < exptectedLength) + while (matchedChars < expectedLength) { - var count = await stream.ReadAsync(responseBuffer, 0, exptectedLength - matchedChars).DefaultTimeout(); + var count = await stream.ReadAsync(responseBuffer, 0, expectedLength - matchedChars).DefaultTimeout(); if (count == 0) { Assert.True(false, "Stream completed without expected substring."); } - for (var i = 0; i < count && matchedChars < exptectedLength; i++) + for (var i = 0; i < count && matchedChars < expectedLength; i++) { if (responseBuffer[i] == expectedBytes[matchedChars]) { @@ -983,5 +1178,26 @@ private static async Task AssertStreamContains(Stream stream, string expectedSub } } } + + private static void SetFinOnError(IServiceCollection services, bool finOnError) + { +#if LIBUV +#pragma warning disable CS0618 // Type or member is obsolete + services.Configure(options => + { + options.FinOnError = finOnError; + }); +#pragma warning restore CS0618 // Type or member is obsolete +#elif SOCKETS + services.Configure(o => + { + o.FinOnError = finOnError; + }); +#endif + services.Configure(o => + { + o.FinOnError = finOnError; + }); + } } } diff --git a/src/Servers/Kestrel/test/FunctionalTests/ResponseTests.cs b/src/Servers/Kestrel/test/FunctionalTests/ResponseTests.cs index 991044dbf8f0..cbda94bd05a6 100644 --- a/src/Servers/Kestrel/test/FunctionalTests/ResponseTests.cs +++ b/src/Servers/Kestrel/test/FunctionalTests/ResponseTests.cs @@ -23,7 +23,13 @@ using Microsoft.AspNetCore.Server.Kestrel.Https; using Microsoft.AspNetCore.Server.Kestrel.Https.Internal; using Microsoft.AspNetCore.Server.Kestrel.Tests; +#if LIBUV +using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv; +#elif SOCKETS +using Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets; +#endif using Microsoft.AspNetCore.Testing; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; @@ -462,8 +468,10 @@ await connection.Send( Assert.Empty(coreLogs.Where(w => w.LogLevel > LogLevel.Information)); } - [Fact] - public async Task ConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate() + [Theory] + [InlineData(true)] + [InlineData(false)] + public async Task ConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate(bool fin) { var logger = LoggerFactory.CreateLogger($"{ typeof(ResponseTests).FullName}.{ nameof(ConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate)}"); const int chunkSize = 1024; @@ -473,21 +481,35 @@ public async Task ConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate() var responseRateTimeoutMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var connectionStopMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var connectionWriteFinMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var connectionWriteRstMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var requestAborted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var appFuncCompleted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - var mockKestrelTrace = new Mock(); - mockKestrelTrace - .Setup(trace => trace.ResponseMinimumDataRateNotSatisfied(It.IsAny(), It.IsAny())) - .Callback(() => responseRateTimeoutMessageLogged.SetResult()); - mockKestrelTrace - .Setup(trace => trace.ConnectionStop(It.IsAny())) - .Callback(() => connectionStopMessageLogged.SetResult()); + TestSink.MessageLogged += context => + { + switch (context.EventId.Name) + { + case "ResponseMinimumDataRateNotSatisfied": + responseRateTimeoutMessageLogged.SetResult(); + break; + case "ConnectionStop": + connectionStopMessageLogged.SetResult(); + break; + case "ConnectionWriteFin": + connectionWriteFinMessageLogged.SetResult(); + break; + case "ConnectionWriteRst": + connectionWriteRstMessageLogged.SetResult(); + break; + } + }; - var testContext = new TestServiceContext(LoggerFactory, mockKestrelTrace.Object) + var testContext = new TestServiceContext(LoggerFactory) { ServerOptions = { + FinOnError = fin, Limits = { MinResponseDataRate = new MinDataRate(bytesPerSecond: 1024 * 1024, gracePeriod: TimeSpan.FromSeconds(2)) @@ -533,7 +555,7 @@ async Task App(HttpContext context) } } - await using (var server = new TestServer(App, testContext)) + await using (var server = new TestServer(App, testContext, configureListenOptions: _ => { }, services => SetFinOnError(services, fin))) { using (var connection = server.CreateConnection()) { @@ -553,8 +575,16 @@ await connection.Send( await requestAborted.Task.DefaultTimeout(TimeSpan.FromSeconds(30)); await responseRateTimeoutMessageLogged.Task.DefaultTimeout(); await connectionStopMessageLogged.Task.DefaultTimeout(); + if (fin) + { + await connectionWriteFinMessageLogged.Task.DefaultTimeout(); + } + else + { + await connectionWriteRstMessageLogged.Task.DefaultTimeout(); + } await appFuncCompleted.Task.DefaultTimeout(); - await AssertStreamAborted(connection.Stream, chunkSize * chunks); + await AssertStreamAborted(connection.Stream, chunkSize * chunks, fin); sw.Stop(); logger.LogInformation("Connection was aborted after {totalMilliseconds}ms.", sw.ElapsedMilliseconds); @@ -562,8 +592,10 @@ await connection.Send( } } - [Fact] - public async Task HttpsConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate() + [Theory] + [InlineData(true)] + [InlineData(false)] + public async Task HttpsConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate(bool fin) { const int chunkSize = 1024; const int chunks = 256 * 1024; @@ -573,21 +605,35 @@ public async Task HttpsConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate var responseRateTimeoutMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var connectionStopMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var connectionWriteFinMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var connectionWriteRstMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var aborted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var appFuncCompleted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - var mockKestrelTrace = new Mock(); - mockKestrelTrace - .Setup(trace => trace.ResponseMinimumDataRateNotSatisfied(It.IsAny(), It.IsAny())) - .Callback(() => responseRateTimeoutMessageLogged.SetResult()); - mockKestrelTrace - .Setup(trace => trace.ConnectionStop(It.IsAny())) - .Callback(() => connectionStopMessageLogged.SetResult()); + TestSink.MessageLogged += context => + { + switch (context.EventId.Name) + { + case "ResponseMinimumDataRateNotSatisfied": + responseRateTimeoutMessageLogged.SetResult(); + break; + case "ConnectionStop": + connectionStopMessageLogged.SetResult(); + break; + case "ConnectionWriteFin": + connectionWriteFinMessageLogged.SetResult(); + break; + case "ConnectionWriteRst": + connectionWriteRstMessageLogged.SetResult(); + break; + } + }; - var testContext = new TestServiceContext(LoggerFactory, mockKestrelTrace.Object) + var testContext = new TestServiceContext(LoggerFactory) { ServerOptions = { + FinOnError = fin, Limits = { MinResponseDataRate = new MinDataRate(bytesPerSecond: 1024 * 1024, gracePeriod: TimeSpan.FromSeconds(2)) @@ -627,7 +673,8 @@ void ConfigureListenOptions(ListenOptions listenOptions) { await aborted.Task.DefaultTimeout(); } - }, testContext, ConfigureListenOptions)) + }, testContext, ConfigureListenOptions, + services => SetFinOnError(services, fin))) { using (var connection = server.CreateConnection()) { @@ -642,16 +689,26 @@ void ConfigureListenOptions(ListenOptions listenOptions) await aborted.Task.DefaultTimeout(TimeSpan.FromSeconds(30)); await responseRateTimeoutMessageLogged.Task.DefaultTimeout(); await connectionStopMessageLogged.Task.DefaultTimeout(); + if (fin) + { + await connectionWriteFinMessageLogged.Task.DefaultTimeout(); + } + else + { + await connectionWriteRstMessageLogged.Task.DefaultTimeout(); + } await appFuncCompleted.Task.DefaultTimeout(); - await AssertStreamAborted(connection.Stream, chunkSize * chunks); + await AssertStreamAborted(connection.Stream, chunkSize * chunks, fin); } } } } - [Fact] - public async Task ConnectionClosedWhenBothRequestAndResponseExperienceBackPressure() + [Theory] + [InlineData(true)] + [InlineData(false)] + public async Task ConnectionClosedWhenBothRequestAndResponseExperienceBackPressure(bool fin) { const int bufferSize = 65536; const int bufferCount = 100; @@ -660,21 +717,35 @@ public async Task ConnectionClosedWhenBothRequestAndResponseExperienceBackPressu var responseRateTimeoutMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var connectionStopMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var connectionWriteFinMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var connectionWriteRstMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var requestAborted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var copyToAsyncCts = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - var mockKestrelTrace = new Mock(); - mockKestrelTrace - .Setup(trace => trace.ResponseMinimumDataRateNotSatisfied(It.IsAny(), It.IsAny())) - .Callback(() => responseRateTimeoutMessageLogged.SetResult()); - mockKestrelTrace - .Setup(trace => trace.ConnectionStop(It.IsAny())) - .Callback(() => connectionStopMessageLogged.SetResult()); + TestSink.MessageLogged += context => + { + switch (context.EventId.Name) + { + case "ResponseMinimumDataRateNotSatisfied": + responseRateTimeoutMessageLogged.SetResult(); + break; + case "ConnectionStop": + connectionStopMessageLogged.SetResult(); + break; + case "ConnectionWriteFin": + connectionWriteFinMessageLogged.SetResult(); + break; + case "ConnectionWriteRst": + connectionWriteRstMessageLogged.SetResult(); + break; + } + }; - var testContext = new TestServiceContext(LoggerFactory, mockKestrelTrace.Object) + var testContext = new TestServiceContext(LoggerFactory) { ServerOptions = { + FinOnError = fin, Limits = { MinResponseDataRate = new MinDataRate(bytesPerSecond: 1024 * 1024, gracePeriod: TimeSpan.FromSeconds(2)), @@ -685,8 +756,6 @@ public async Task ConnectionClosedWhenBothRequestAndResponseExperienceBackPressu testContext.InitializeHeartbeat(); - var listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0)); - async Task App(HttpContext context) { context.RequestAborted.Register(() => @@ -711,7 +780,7 @@ async Task App(HttpContext context) copyToAsyncCts.SetException(new Exception("This shouldn't be reached.")); } - await using (var server = new TestServer(App, testContext, listenOptions)) + await using (var server = new TestServer(App, testContext, configureListenOptions: _ => { }, services => SetFinOnError(services, fin))) { using (var connection = server.CreateConnection()) { @@ -736,10 +805,18 @@ await connection.Send( await requestAborted.Task.DefaultTimeout(TimeSpan.FromSeconds(30)); await responseRateTimeoutMessageLogged.Task.DefaultTimeout(); await connectionStopMessageLogged.Task.DefaultTimeout(); + if (fin) + { + await connectionWriteFinMessageLogged.Task.DefaultTimeout(); + } + else + { + await connectionWriteRstMessageLogged.Task.DefaultTimeout(); + } // Expect OperationCanceledException instead of IOException because the server initiated the abort due to a response rate timeout. await Assert.ThrowsAnyAsync(() => copyToAsyncCts.Task).DefaultTimeout(); - await AssertStreamAborted(connection.Stream, responseSize); + await AssertStreamAborted(connection.Stream, responseSize, graceful: false); } } } @@ -985,7 +1062,7 @@ await connection.Receive( Assert.False(requestAborted); } - private async Task AssertStreamAborted(Stream stream, int totalBytes) + private async Task AssertStreamAborted(Stream stream, int totalBytes, bool graceful) { var receiveBuffer = new byte[64 * 1024]; var totalReceived = 0; @@ -998,6 +1075,8 @@ private async Task AssertStreamAborted(Stream stream, int totalBytes) if (bytes == 0) { + Assert.True(graceful, "Stream completed gracefully."); + break; } @@ -1006,7 +1085,7 @@ private async Task AssertStreamAborted(Stream stream, int totalBytes) } catch (IOException) { - // This is expected given an abort. + Assert.False(graceful, "Stream completed abortively."); } Assert.True(totalReceived < totalBytes, $"{nameof(AssertStreamAborted)} Stream completed successfully."); @@ -1080,5 +1159,26 @@ public static TheoryData NullHeaderData return dataset; } } + + private static void SetFinOnError(IServiceCollection services, bool finOnError) + { +#if LIBUV +#pragma warning disable CS0618 // Type or member is obsolete + services.Configure(options => + { + options.FinOnError = finOnError; + }); +#pragma warning restore CS0618 // Type or member is obsolete +#elif SOCKETS + services.Configure(o => + { + o.FinOnError = finOnError; + }); +#endif + services.Configure(o => + { + o.FinOnError = finOnError; + }); + } } } From 80935a445a63b845f78e875049a1d44434af7dd3 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 2 Aug 2023 03:25:30 +0000 Subject: [PATCH 32/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 8 ++++++-- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/NuGet.config b/NuGet.config index 65bb92f0d5be..fe79bbc338d2 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,12 @@ - + + + @@ -25,10 +27,12 @@ + + - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8cf765e85742..470204c2a58c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + 5a218984448228027d0c5613fc49132e9eee7fe4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -245,33 +245,33 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + 5a218984448228027d0c5613fc49132e9eee7fe4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + 5a218984448228027d0c5613fc49132e9eee7fe4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + 5a218984448228027d0c5613fc49132e9eee7fe4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + 5a218984448228027d0c5613fc49132e9eee7fe4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + 5a218984448228027d0c5613fc49132e9eee7fe4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + 5a218984448228027d0c5613fc49132e9eee7fe4 diff --git a/eng/Versions.props b/eng/Versions.props index 9a77756a55fe..ca9d29c47357 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,12 +63,12 @@ 6.0.0 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21-servicing.23363.11 + 6.0.22 + 6.0.22 + 6.0.22 + 6.0.22 + 6.0.22 + 6.0.22-servicing.23401.9 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.21-servicing.23363.11 + 6.0.22-servicing.23401.9 6.0.1 6.0.0 6.0.2 From 4a6bf8236763b0f4b245d9edcffd5c31e93d0810 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 2 Aug 2023 10:39:18 +0000 Subject: [PATCH 33/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 18 +++++++++--------- eng/Versions.props | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/NuGet.config b/NuGet.config index fe79bbc338d2..8c232bc6cb3a 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -32,7 +32,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 470204c2a58c..f49eb66e78e8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5a218984448228027d0c5613fc49132e9eee7fe4 + a51eda716136f8beccac9c063818aa536939af61 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5a218984448228027d0c5613fc49132e9eee7fe4 + a51eda716136f8beccac9c063818aa536939af61 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5a218984448228027d0c5613fc49132e9eee7fe4 + a51eda716136f8beccac9c063818aa536939af61 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5a218984448228027d0c5613fc49132e9eee7fe4 + a51eda716136f8beccac9c063818aa536939af61 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5a218984448228027d0c5613fc49132e9eee7fe4 + a51eda716136f8beccac9c063818aa536939af61 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5a218984448228027d0c5613fc49132e9eee7fe4 + a51eda716136f8beccac9c063818aa536939af61 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5a218984448228027d0c5613fc49132e9eee7fe4 + a51eda716136f8beccac9c063818aa536939af61 diff --git a/eng/Versions.props b/eng/Versions.props index ca9d29c47357..75b4cccac11c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.22 6.0.22 6.0.22 - 6.0.22-servicing.23401.9 + 6.0.22-servicing.23401.20 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.22-servicing.23401.9 + 6.0.22-servicing.23401.20 6.0.1 6.0.0 6.0.2 From 45266f78484a55c1ff551eebad7f1618947bdd1e Mon Sep 17 00:00:00 2001 From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com> Date: Wed, 2 Aug 2023 11:10:31 -0700 Subject: [PATCH 34/83] Update branding to 6.0.22 (#49778) --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index e3f38cdfb61a..a68d8be79ed6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,8 +8,8 @@ 6 0 - 21 - true + 22 + false From cdd11ebc404b9fab68679b3352e4acc473e3123d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 18:48:38 +0000 Subject: [PATCH 35/83] [release/6.0] (deps): Bump src/submodules/googletest (#49770) Bumps [src/submodules/googletest](https://github.com/google/googletest) from `be03d00` to `6f6ab42`. - [Release notes](https://github.com/google/googletest/releases) - [Commits](https://github.com/google/googletest/compare/be03d00f5f0cc3a997d1a368bee8a1fe93651f48...6f6ab4212aa02cfe02e480711246da4fc17b0761) --- updated-dependencies: - dependency-name: src/submodules/googletest dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/submodules/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/googletest b/src/submodules/googletest index be03d00f5f0c..6f6ab4212aa0 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit be03d00f5f0cc3a997d1a368bee8a1fe93651f48 +Subproject commit 6f6ab4212aa02cfe02e480711246da4fc17b0761 From 58d572af8d4b51da9669b5aa49d4b1f2cae64e33 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 2 Aug 2023 20:04:24 +0000 Subject: [PATCH 36/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-efcore --- NuGet.config | 8 ++------ eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 3 files changed, 26 insertions(+), 30 deletions(-) diff --git a/NuGet.config b/NuGet.config index 8c232bc6cb3a..87d8756d060a 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,9 +7,7 @@ - - - + @@ -27,9 +25,7 @@ - - - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f49eb66e78e8..99c46abbcc93 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + c62df6b705f70fd03d8ec8feba5ffddd93f35134 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + c62df6b705f70fd03d8ec8feba5ffddd93f35134 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + c62df6b705f70fd03d8ec8feba5ffddd93f35134 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + c62df6b705f70fd03d8ec8feba5ffddd93f35134 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + c62df6b705f70fd03d8ec8feba5ffddd93f35134 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + c62df6b705f70fd03d8ec8feba5ffddd93f35134 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + c62df6b705f70fd03d8ec8feba5ffddd93f35134 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + c62df6b705f70fd03d8ec8feba5ffddd93f35134 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index d3e691623ffa..5a3ca1d0f9b2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -122,14 +122,14 @@ 6.0.11 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 + 6.0.22 + 6.0.22 + 6.0.22 + 6.0.22 + 6.0.22 + 6.0.22 + 6.0.22 + 6.0.22 6.0.0-beta.23361.3 6.0.0-beta.23361.3 From 9dbd19b1421b22c49dfd2454f44e08af9c60d78a Mon Sep 17 00:00:00 2001 From: William Godbe Date: Thu, 3 Aug 2023 13:23:38 -0700 Subject: [PATCH 37/83] Move to MacOS 13 (#49367) --- eng/targets/Helix.Common.props | 2 +- src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/targets/Helix.Common.props b/eng/targets/Helix.Common.props index ace38de8e19a..4b9a86cf4623 100644 --- a/eng/targets/Helix.Common.props +++ b/eng/targets/Helix.Common.props @@ -31,7 +31,7 @@ - + diff --git a/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs b/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs index 30e791259528..18473c3a7b35 100644 --- a/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs +++ b/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Identity.Test { - [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/38542", Queues="OSX.1015.Amd64.Open;OSX.1015.Amd64")] //slow + [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/38542", Queues="OSX.13.Amd64.Open;OSX.13.AMD64")] //slow public class IdentityUIScriptsTest : IDisposable { private readonly ITestOutputHelper _output; From 54ce6171d4eb8a54f9682abe91f3a61a0731f23a Mon Sep 17 00:00:00 2001 From: Brennan Date: Mon, 7 Aug 2023 09:00:20 -0700 Subject: [PATCH 38/83] Update NuGet (#49872) --- eng/Versions.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index a68d8be79ed6..d4e7768f2d2a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -206,9 +206,9 @@ 11.1.0 1.4.0 6.10.0 - 6.0.0 - 6.0.0 - 6.0.0 + 6.0.5 + 6.0.5 + 6.0.5 5.0.0 5.0.0-alpha.20560.6 5.0.0 From 8df26a129f8cec3ac4afe429f14dc42955a4e73a Mon Sep 17 00:00:00 2001 From: wtgodbe Date: Tue, 8 Aug 2023 11:00:08 -0700 Subject: [PATCH 39/83] Update baseline, SDK --- eng/Baseline.Designer.props | 444 ++++++++++++++++++------------------ eng/Baseline.xml | 214 ++++++++--------- eng/Versions.props | 2 +- global.json | 4 +- 4 files changed, 332 insertions(+), 332 deletions(-) diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index ae468b57d8d0..e79ad5771518 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,28 +2,28 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - - - + + + @@ -34,120 +34,120 @@ - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 @@ -155,114 +155,114 @@ - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - + - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 - + - 6.0.20 + 6.0.21 - - - + + + - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - - + + @@ -270,7 +270,7 @@ - 6.0.20 + 6.0.21 @@ -278,50 +278,50 @@ - 6.0.20 + 6.0.21 - + - + - + - + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - - + + @@ -331,8 +331,8 @@ - - + + @@ -340,8 +340,8 @@ - - + + @@ -352,58 +352,58 @@ - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - + - 6.0.20 + 6.0.21 @@ -411,71 +411,71 @@ - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - + - + - + - + - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 @@ -491,195 +491,195 @@ - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - + - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 - - + + - 6.0.20 + 6.0.21 - + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - + - 6.0.20 + 6.0.21 - - + + - - + + - - + + - 6.0.20 + 6.0.21 - - + + - - + + - - + + - - + + - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - - - - + + + + - 6.0.20 + 6.0.21 @@ -688,69 +688,69 @@ - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - + - 6.0.20 + 6.0.21 - + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 @@ -769,7 +769,7 @@ - 6.0.20 + 6.0.21 @@ -788,7 +788,7 @@ - 6.0.20 + 6.0.21 @@ -804,46 +804,46 @@ - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - - - + + + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 @@ -853,7 +853,7 @@ - 6.0.20 + 6.0.21 @@ -862,73 +862,73 @@ - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - + - + - + - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 @@ -957,11 +957,11 @@ - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 @@ -979,13 +979,13 @@ - 6.0.20 + 6.0.21 - 6.0.20 + 6.0.21 - + \ No newline at end of file diff --git a/eng/Baseline.xml b/eng/Baseline.xml index 604ee1e588e2..bb265398da62 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -4,111 +4,111 @@ This file contains a list of all the packages and their versions which were rele Update this list when preparing for a new patch. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eng/Versions.props b/eng/Versions.props index 364271f41f9d..087f57c1fc1c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -9,7 +9,7 @@ 6 0 22 - false + true diff --git a/global.json b/global.json index b96453f5621d..90b85c957751 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "6.0.120" + "version": "6.0.121" }, "tools": { - "dotnet": "6.0.120", + "dotnet": "6.0.121", "runtimes": { "dotnet/x64": [ "2.1.30", From bb343895e35fda23d654b8e08f767a864a7eb717 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 8 Aug 2023 22:15:59 +0000 Subject: [PATCH 40/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-efcore --- NuGet.config | 4 ++-- eng/Version.Details.xml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NuGet.config b/NuGet.config index 87d8756d060a..9ff4c44b8aa2 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,7 +7,7 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 99c46abbcc93..78ff60f36111 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -11,35 +11,35 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - c62df6b705f70fd03d8ec8feba5ffddd93f35134 + d5765348498c7e13cd8261bdab31b5d00636822b https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - c62df6b705f70fd03d8ec8feba5ffddd93f35134 + d5765348498c7e13cd8261bdab31b5d00636822b https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - c62df6b705f70fd03d8ec8feba5ffddd93f35134 + d5765348498c7e13cd8261bdab31b5d00636822b https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - c62df6b705f70fd03d8ec8feba5ffddd93f35134 + d5765348498c7e13cd8261bdab31b5d00636822b https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - c62df6b705f70fd03d8ec8feba5ffddd93f35134 + d5765348498c7e13cd8261bdab31b5d00636822b https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - c62df6b705f70fd03d8ec8feba5ffddd93f35134 + d5765348498c7e13cd8261bdab31b5d00636822b https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - c62df6b705f70fd03d8ec8feba5ffddd93f35134 + d5765348498c7e13cd8261bdab31b5d00636822b https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - c62df6b705f70fd03d8ec8feba5ffddd93f35134 + d5765348498c7e13cd8261bdab31b5d00636822b https://github.com/dotnet/runtime From 42af1fe8be1869b034feeec5aaefc0efb561564f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:54:49 +0000 Subject: [PATCH 41/83] Update dependencies from https://github.com/dotnet/arcade build 20230808.5 (#49954) [release/6.0] Update dependencies from dotnet/arcade --- NuGet.config | 4 ---- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/NuGet.config b/NuGet.config index 65bb92f0d5be..1e2458c409ad 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,8 @@ - - @@ -25,10 +23,8 @@ - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8cf765e85742..daa673a9468b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -280,22 +280,22 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 - + https://github.com/dotnet/arcade - cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34 + 98fd22588fbb0f407faa6a74cb1aa79031306151 - + https://github.com/dotnet/arcade - cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34 + 98fd22588fbb0f407faa6a74cb1aa79031306151 - + https://github.com/dotnet/arcade - cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34 + 98fd22588fbb0f407faa6a74cb1aa79031306151 - + https://github.com/dotnet/arcade - cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34 + 98fd22588fbb0f407faa6a74cb1aa79031306151 diff --git a/eng/Versions.props b/eng/Versions.props index 087f57c1fc1c..8a33dbf1a7d0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -131,8 +131,8 @@ 6.0.21 6.0.21 - 6.0.0-beta.23361.3 - 6.0.0-beta.23361.3 + 6.0.0-beta.23408.5 + 6.0.0-beta.23408.5 - + @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5b06ab1e5888..1a70f5338b2d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a51eda716136f8beccac9c063818aa536939af61 + 8eab88d043e6baba9968ea618b28aa28afcf83b4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a51eda716136f8beccac9c063818aa536939af61 + 8eab88d043e6baba9968ea618b28aa28afcf83b4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a51eda716136f8beccac9c063818aa536939af61 + 8eab88d043e6baba9968ea618b28aa28afcf83b4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a51eda716136f8beccac9c063818aa536939af61 + 8eab88d043e6baba9968ea618b28aa28afcf83b4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a51eda716136f8beccac9c063818aa536939af61 + 8eab88d043e6baba9968ea618b28aa28afcf83b4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a51eda716136f8beccac9c063818aa536939af61 + 8eab88d043e6baba9968ea618b28aa28afcf83b4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - a51eda716136f8beccac9c063818aa536939af61 + 8eab88d043e6baba9968ea618b28aa28afcf83b4 diff --git a/eng/Versions.props b/eng/Versions.props index 1dd9ef7d0580..93beffa08a94 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.22 6.0.22 6.0.22 - 6.0.22-servicing.23401.20 + 6.0.22-servicing.23410.5 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.22-servicing.23401.20 + 6.0.22-servicing.23410.5 6.0.1 6.0.0 6.0.2 From 4d6037c5c1e83478b32060a60ce97d9bd77a7054 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Sat, 12 Aug 2023 06:19:21 +0000 Subject: [PATCH 43/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 18 +++++++++--------- eng/Versions.props | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/NuGet.config b/NuGet.config index 0d7443d4fb61..f003b00c28eb 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1a70f5338b2d..4ced0b6af68b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8eab88d043e6baba9968ea618b28aa28afcf83b4 + 8164fed1684d41a4a5bd32379fe05e632a530a16 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8eab88d043e6baba9968ea618b28aa28afcf83b4 + 8164fed1684d41a4a5bd32379fe05e632a530a16 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8eab88d043e6baba9968ea618b28aa28afcf83b4 + 8164fed1684d41a4a5bd32379fe05e632a530a16 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8eab88d043e6baba9968ea618b28aa28afcf83b4 + 8164fed1684d41a4a5bd32379fe05e632a530a16 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8eab88d043e6baba9968ea618b28aa28afcf83b4 + 8164fed1684d41a4a5bd32379fe05e632a530a16 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8eab88d043e6baba9968ea618b28aa28afcf83b4 + 8164fed1684d41a4a5bd32379fe05e632a530a16 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8eab88d043e6baba9968ea618b28aa28afcf83b4 + 8164fed1684d41a4a5bd32379fe05e632a530a16 diff --git a/eng/Versions.props b/eng/Versions.props index 93beffa08a94..a5718db283c1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.22 6.0.22 6.0.22 - 6.0.22-servicing.23410.5 + 6.0.22-servicing.23411.16 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.22-servicing.23410.5 + 6.0.22-servicing.23411.16 6.0.1 6.0.0 6.0.2 From d64564a1514b5250cac0337fb0759c92cdaa23e6 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 15 Aug 2023 10:21:25 +0000 Subject: [PATCH 44/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 18 +++++++++--------- eng/Versions.props | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/NuGet.config b/NuGet.config index f003b00c28eb..9c526de6e200 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4ced0b6af68b..7c0d3bbc5e68 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8164fed1684d41a4a5bd32379fe05e632a530a16 + 0a9fee4daf8b2cf93643927a4d598a933fd04851 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8164fed1684d41a4a5bd32379fe05e632a530a16 + 0a9fee4daf8b2cf93643927a4d598a933fd04851 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8164fed1684d41a4a5bd32379fe05e632a530a16 + 0a9fee4daf8b2cf93643927a4d598a933fd04851 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8164fed1684d41a4a5bd32379fe05e632a530a16 + 0a9fee4daf8b2cf93643927a4d598a933fd04851 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8164fed1684d41a4a5bd32379fe05e632a530a16 + 0a9fee4daf8b2cf93643927a4d598a933fd04851 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8164fed1684d41a4a5bd32379fe05e632a530a16 + 0a9fee4daf8b2cf93643927a4d598a933fd04851 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 8164fed1684d41a4a5bd32379fe05e632a530a16 + 0a9fee4daf8b2cf93643927a4d598a933fd04851 diff --git a/eng/Versions.props b/eng/Versions.props index a5718db283c1..375f0f1cddda 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.22 6.0.22 6.0.22 - 6.0.22-servicing.23411.16 + 6.0.22-servicing.23414.22 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.22-servicing.23411.16 + 6.0.22-servicing.23414.22 6.0.1 6.0.0 6.0.2 From 2313cbb5c260e55f2236b46609014a697212c1c4 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Tue, 15 Aug 2023 19:36:39 +0000 Subject: [PATCH 45/83] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20230815.3 Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.BrowserDebugHost.Transport From Version 6.0.22-servicing.23414.22 -> To Version 6.0.22-servicing.23415.3 --- NuGet.config | 4 ++-- eng/Version.Details.xml | 18 +++++++++--------- eng/Versions.props | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/NuGet.config b/NuGet.config index 9c526de6e200..3cf86380cd58 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7c0d3bbc5e68..cac926eb038d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0a9fee4daf8b2cf93643927a4d598a933fd04851 + 683c57982ac41cf4beead6fef7f03e86a111dd3c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0a9fee4daf8b2cf93643927a4d598a933fd04851 + 683c57982ac41cf4beead6fef7f03e86a111dd3c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0a9fee4daf8b2cf93643927a4d598a933fd04851 + 683c57982ac41cf4beead6fef7f03e86a111dd3c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0a9fee4daf8b2cf93643927a4d598a933fd04851 + 683c57982ac41cf4beead6fef7f03e86a111dd3c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0a9fee4daf8b2cf93643927a4d598a933fd04851 + 683c57982ac41cf4beead6fef7f03e86a111dd3c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0a9fee4daf8b2cf93643927a4d598a933fd04851 + 683c57982ac41cf4beead6fef7f03e86a111dd3c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 0a9fee4daf8b2cf93643927a4d598a933fd04851 + 683c57982ac41cf4beead6fef7f03e86a111dd3c diff --git a/eng/Versions.props b/eng/Versions.props index 375f0f1cddda..54b030f3b927 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.22 6.0.22 6.0.22 - 6.0.22-servicing.23414.22 + 6.0.22-servicing.23415.3 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.22-servicing.23414.22 + 6.0.22-servicing.23415.3 6.0.1 6.0.0 6.0.2 From 973557760847bcb6309ce3f79ce503f38a04cdff Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Tue, 15 Aug 2023 22:17:58 +0000 Subject: [PATCH 46/83] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-efcore build 20230809.7 dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools From Version 6.0.22 -> To Version 6.0.22 --- NuGet.config | 4 ++-- eng/Version.Details.xml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NuGet.config b/NuGet.config index 3cf86380cd58..4a5b5ed0dc7c 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,7 +7,7 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index cac926eb038d..434ad4ffe8de 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -11,35 +11,35 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - d5765348498c7e13cd8261bdab31b5d00636822b + 687fc8f9a538592b2b1494f6353293aac5da74a5 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - d5765348498c7e13cd8261bdab31b5d00636822b + 687fc8f9a538592b2b1494f6353293aac5da74a5 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - d5765348498c7e13cd8261bdab31b5d00636822b + 687fc8f9a538592b2b1494f6353293aac5da74a5 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - d5765348498c7e13cd8261bdab31b5d00636822b + 687fc8f9a538592b2b1494f6353293aac5da74a5 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - d5765348498c7e13cd8261bdab31b5d00636822b + 687fc8f9a538592b2b1494f6353293aac5da74a5 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - d5765348498c7e13cd8261bdab31b5d00636822b + 687fc8f9a538592b2b1494f6353293aac5da74a5 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - d5765348498c7e13cd8261bdab31b5d00636822b + 687fc8f9a538592b2b1494f6353293aac5da74a5 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - d5765348498c7e13cd8261bdab31b5d00636822b + 687fc8f9a538592b2b1494f6353293aac5da74a5 https://github.com/dotnet/runtime From f9a977fa26e4ba036bc74a60797b1de3a6e3ed07 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 16 Aug 2023 02:41:19 +0000 Subject: [PATCH 47/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 18 +++++++++--------- eng/Versions.props | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/NuGet.config b/NuGet.config index 4a5b5ed0dc7c..bb141a01de8f 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 434ad4ffe8de..8908adae4e81 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 683c57982ac41cf4beead6fef7f03e86a111dd3c + ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 683c57982ac41cf4beead6fef7f03e86a111dd3c + ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 683c57982ac41cf4beead6fef7f03e86a111dd3c + ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 683c57982ac41cf4beead6fef7f03e86a111dd3c + ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 683c57982ac41cf4beead6fef7f03e86a111dd3c + ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 683c57982ac41cf4beead6fef7f03e86a111dd3c + ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 683c57982ac41cf4beead6fef7f03e86a111dd3c + ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf diff --git a/eng/Versions.props b/eng/Versions.props index 54b030f3b927..4d9d04a07475 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.22 6.0.22 6.0.22 - 6.0.22-servicing.23415.3 + 6.0.22-servicing.23415.11 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.22-servicing.23415.3 + 6.0.22-servicing.23415.11 6.0.1 6.0.0 6.0.2 From cec8e699eac837c5cc692569da537ca17dc85f14 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Fri, 25 Aug 2023 05:25:30 +0000 Subject: [PATCH 48/83] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20230824.25 Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.BrowserDebugHost.Transport From Version 6.0.22-servicing.23415.11 -> To Version 6.0.22-servicing.23424.25 --- NuGet.config | 6 ++++-- eng/Version.Details.xml | 18 +++++++++--------- eng/Versions.props | 4 ++-- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/NuGet.config b/NuGet.config index bb141a01de8f..9fede3245833 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,11 @@ - + + @@ -25,10 +26,11 @@ + - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8908adae4e81..66cdb6dd76f1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf + 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf + 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf + 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf + 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf + 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf + 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf + 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd diff --git a/eng/Versions.props b/eng/Versions.props index 4d9d04a07475..04c46827f4d4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.22 6.0.22 6.0.22 - 6.0.22-servicing.23415.11 + 6.0.22-servicing.23424.25 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.22-servicing.23415.11 + 6.0.22-servicing.23424.25 6.0.1 6.0.0 6.0.2 From d263f99f4409afe3dc487d136e332aa474102db7 Mon Sep 17 00:00:00 2001 From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:17:44 -0700 Subject: [PATCH 49/83] Update branding to 6.0.23 (#50461) --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 8a33dbf1a7d0..c08c43481bca 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,8 +8,8 @@ 6 0 - 22 - true + 23 + false From ba041f0169f2af7a24ae24e96404fdc8466cf60d Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Thu, 31 Aug 2023 22:50:05 +0000 Subject: [PATCH 50/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-efcore --- NuGet.config | 10 ++++++---- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/NuGet.config b/NuGet.config index 9fede3245833..155a4143b5a1 100644 --- a/NuGet.config +++ b/NuGet.config @@ -5,10 +5,11 @@ + + - - + @@ -26,10 +27,11 @@ - - + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 66cdb6dd76f1..a82242af5eed 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 687fc8f9a538592b2b1494f6353293aac5da74a5 + a0b8ded285e2233a70b77c9a74b0ad32e1340739 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 687fc8f9a538592b2b1494f6353293aac5da74a5 + a0b8ded285e2233a70b77c9a74b0ad32e1340739 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 687fc8f9a538592b2b1494f6353293aac5da74a5 + a0b8ded285e2233a70b77c9a74b0ad32e1340739 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 687fc8f9a538592b2b1494f6353293aac5da74a5 + a0b8ded285e2233a70b77c9a74b0ad32e1340739 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 687fc8f9a538592b2b1494f6353293aac5da74a5 + a0b8ded285e2233a70b77c9a74b0ad32e1340739 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 687fc8f9a538592b2b1494f6353293aac5da74a5 + a0b8ded285e2233a70b77c9a74b0ad32e1340739 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 687fc8f9a538592b2b1494f6353293aac5da74a5 + a0b8ded285e2233a70b77c9a74b0ad32e1340739 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 687fc8f9a538592b2b1494f6353293aac5da74a5 + a0b8ded285e2233a70b77c9a74b0ad32e1340739 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index aab6fc8d22e9..bbab51a7e2bf 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -122,14 +122,14 @@ 6.0.11 - 6.0.22 - 6.0.22 - 6.0.22 - 6.0.22 - 6.0.22 - 6.0.22 - 6.0.22 - 6.0.22 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 6.0.0-beta.23408.5 6.0.0-beta.23408.5 From 4423a46856873cf9baa5fe95d9c6baa1a3fb7aca Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Fri, 1 Sep 2023 04:49:22 +0000 Subject: [PATCH 51/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 8 ++------ eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/NuGet.config b/NuGet.config index 155a4143b5a1..8c2ffd2b1364 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,9 +4,7 @@ - - - + @@ -30,9 +28,7 @@ - - - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a82242af5eed..0fba7d464833 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd + 211b7ecbebe2576cbbbc205a3658361441018b61 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -245,33 +245,33 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd + 211b7ecbebe2576cbbbc205a3658361441018b61 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd + 211b7ecbebe2576cbbbc205a3658361441018b61 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd + 211b7ecbebe2576cbbbc205a3658361441018b61 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd + 211b7ecbebe2576cbbbc205a3658361441018b61 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd + 211b7ecbebe2576cbbbc205a3658361441018b61 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd + 211b7ecbebe2576cbbbc205a3658361441018b61 diff --git a/eng/Versions.props b/eng/Versions.props index bbab51a7e2bf..4a6672b69a0a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,12 +63,12 @@ 6.0.0 - 6.0.22 - 6.0.22 - 6.0.22 - 6.0.22 - 6.0.22 - 6.0.22-servicing.23424.25 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23-servicing.23431.21 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.22-servicing.23424.25 + 6.0.23-servicing.23431.21 6.0.1 6.0.0 6.0.2 From 8ec91862893d2b5422c399582d99961bee252335 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 09:12:22 -0700 Subject: [PATCH 52/83] [release/6.0] (deps): Bump src/submodules/googletest (#50475) Bumps [src/submodules/googletest](https://github.com/google/googletest) from `6f6ab42` to `8a6feab`. - [Release notes](https://github.com/google/googletest/releases) - [Commits](https://github.com/google/googletest/compare/6f6ab4212aa02cfe02e480711246da4fc17b0761...8a6feabf04bec8fb125e0df0ad1195c42350725f) --- updated-dependencies: - dependency-name: src/submodules/googletest dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/submodules/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/googletest b/src/submodules/googletest index 6f6ab4212aa0..8a6feabf04be 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit 6f6ab4212aa02cfe02e480711246da4fc17b0761 +Subproject commit 8a6feabf04bec8fb125e0df0ad1195c42350725f From bc60047c33de2e6d534151b8c41be077f53417ab Mon Sep 17 00:00:00 2001 From: Nolan Glore Date: Fri, 1 Sep 2023 09:27:14 -0700 Subject: [PATCH 53/83] Fixup pRequestInfo after GCs (#50447) --- src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs b/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs index 51e734bf504a..c4475d5eb5a5 100644 --- a/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs +++ b/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs @@ -553,9 +553,12 @@ private IReadOnlyDictionary> GetRequestInfo(IntPtr bas var info = new Dictionary>(count); + long fixup = (byte*)nativeRequest - (byte*)baseAddress; + var pRequestInfo = (HttpApiTypes.HTTP_REQUEST_INFO*)((byte*)nativeRequest->pRequestInfo + fixup); + for (var i = 0; i < count; i++) { - var requestInfo = nativeRequest->pRequestInfo[i]; + var requestInfo = pRequestInfo[i]; var offset = (long)requestInfo.pInfo - (long)baseAddress; info.Add( (int)requestInfo.InfoType, From 529ed6b7ea2f4a27e5fef3044868d5b359a3e953 Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Wed, 6 Sep 2023 10:40:25 -0700 Subject: [PATCH 54/83] Update jquery-validation to v1.19.5 (#50484) --- .../Pages/V4/_ValidationScriptsPartial.cshtml | 4 +- .../Pages/V5/_ValidationScriptsPartial.cshtml | 4 +- src/Identity/UI/src/THIRD-PARTY-NOTICES.txt | 2 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- .../Shared/_ValidationScriptsPartial.cshtml | 2 +- .../Shared/_ValidationScriptsPartial.cshtml | 2 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- src/ProjectTemplates/THIRD-PARTY-NOTICES | 2 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- .../samples/ClaimsTransformation/bower.json | 2 +- .../wwwroot/lib/jquery-validation/.bower.json | 16 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../dist/additional-methods.min.js | 8 +- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../dist/jquery.validate.min.js | 8 +- .../wwwroot/lib/jquery/.bower.json | 2 +- .../wwwroot/lib/jquery/dist/jquery.min.map | 2 +- src/Security/samples/Cookies/bower.json | 2 +- .../wwwroot/lib/jquery-validation/.bower.json | 16 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../dist/additional-methods.min.js | 8 +- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../dist/jquery.validate.min.js | 8 +- .../Cookies/wwwroot/lib/jquery/.bower.json | 2 +- .../wwwroot/lib/jquery/dist/jquery.min.map | 2 +- .../wwwroot/lib/jquery-validation/.bower.json | 19 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../wwwroot/lib/jquery-validation/.bower.json | 19 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../samples/PathSchemeSelection/bower.json | 2 +- .../wwwroot/lib/jquery-validation/.bower.json | 16 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../dist/additional-methods.min.js | 8 +- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../dist/jquery.validate.min.js | 8 +- .../wwwroot/lib/jquery/.bower.json | 2 +- .../wwwroot/lib/jquery/dist/jquery.min.map | 2 +- .../wwwroot/lib/jquery-validation/.bower.json | 19 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../dist/additional-methods.min.js | 8 +- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../dist/jquery.validate.min.js | 8 +- 65 files changed, 11695 insertions(+), 4546 deletions(-) diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml index 74ca36266548..a67a209cbe94 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml @@ -3,11 +3,11 @@ - - + diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml index 6cd4eed86820..da4aebe98a86 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml @@ -1,2 +1,2 @@ - + diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js index e129bc0f74b9..c6a7229185ab 100644 --- a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js +++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js @@ -1,9 +1,9 @@ /*! - * jQuery Validation Plugin v1.17.0 + * jQuery Validation Plugin v1.19.5 * * https://jqueryvalidation.org/ * - * Copyright (c) 2017 Jörn Zaefferer + * Copyright (c) 2022 Jörn Zaefferer * Released under the MIT license */ (function( factory ) { @@ -43,6 +43,38 @@ }() ); +/** + * This is used in the United States to process payments, deposits, + * or transfers using the Automated Clearing House (ACH) or Fedwire + * systems. A very common use case would be to validate a form for + * an ACH bill payment. + */ +$.validator.addMethod( "abaRoutingNumber", function( value ) { + var checksum = 0; + var tokens = value.split( "" ); + var length = tokens.length; + + // Length Check + if ( length !== 9 ) { + return false; + } + + // Calc the checksum + // https://en.wikipedia.org/wiki/ABA_routing_transit_number + for ( var i = 0; i < length; i += 3 ) { + checksum += parseInt( tokens[ i ], 10 ) * 3 + + parseInt( tokens[ i + 1 ], 10 ) * 7 + + parseInt( tokens[ i + 2 ], 10 ); + } + + // If not zero and divisible by 10 then valid + if ( checksum !== 0 && checksum % 10 === 0 ) { + return true; + } + + return false; +}, "Please enter a valid routing number." ); + // Accept a value from a file input based on a required mimetype $.validator.addMethod( "accept", function( value, element, param ) { @@ -87,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) { $.validator.addMethod( "alphanumeric", function( value, element ) { return this.optional( element ) || /^\w+$/i.test( value ); -}, "Letters, numbers, and underscores only please" ); +}, "Letters, numbers, and underscores only please." ); /* * Dutch bank account numbers (not 'giro' numbers) have 9 digits @@ -114,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) { sum = sum + factor * digit; } return sum % 11 === 0; -}, "Please specify a valid bank account number" ); +}, "Please specify a valid bank account number." ); $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) { return this.optional( element ) || ( $.validator.methods.bankaccountNL.call( this, value, element ) ) || ( $.validator.methods.giroaccountNL.call( this, value, element ) ); -}, "Please specify a valid bank or giro account number" ); +}, "Please specify a valid bank or giro account number." ); /** * BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity. @@ -139,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) { */ $.validator.addMethod( "bic", function( value, element ) { return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() ); -}, "Please specify a valid BIC code" ); +}, "Please specify a valid BIC code." ); /* * Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities @@ -256,11 +288,141 @@ $.validator.addMethod( "cifES", function( value, element ) { }, "Please specify a valid CIF number." ); +/* + * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number. + * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation. + */ +$.validator.addMethod( "cnhBR", function( value ) { + + // Removing special characters from value + value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" ); + + // Checking value to have 11 digits only + if ( value.length !== 11 ) { + return false; + } + + var sum = 0, dsc = 0, firstChar, + firstCN, secondCN, i, j, v; + + firstChar = value.charAt( 0 ); + + if ( new Array( 12 ).join( firstChar ) === value ) { + return false; + } + + // Step 1 - using first Check Number: + for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) { + sum += +( value.charAt( i ) * j ); + } + + firstCN = sum % 11; + if ( firstCN >= 10 ) { + firstCN = 0; + dsc = 2; + } + + sum = 0; + for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) { + sum += +( value.charAt( i ) * j ); + } + + secondCN = sum % 11; + if ( secondCN >= 10 ) { + secondCN = 0; + } else { + secondCN = secondCN - dsc; + } + + return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) ); + +}, "Please specify a valid CNH number." ); + +/* + * Brazillian value number (Cadastrado de Pessoas Juridica). + * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation. + */ +$.validator.addMethod( "cnpjBR", function( value, element ) { + "use strict"; + + if ( this.optional( element ) ) { + return true; + } + + // Removing no number + value = value.replace( /[^\d]+/g, "" ); + + // Checking value to have 14 digits only + if ( value.length !== 14 ) { + return false; + } + + // Elimina values invalidos conhecidos + if ( value === "00000000000000" || + value === "11111111111111" || + value === "22222222222222" || + value === "33333333333333" || + value === "44444444444444" || + value === "55555555555555" || + value === "66666666666666" || + value === "77777777777777" || + value === "88888888888888" || + value === "99999999999999" ) { + return false; + } + + // Valida DVs + var tamanho = ( value.length - 2 ); + var numeros = value.substring( 0, tamanho ); + var digitos = value.substring( tamanho ); + var soma = 0; + var pos = tamanho - 7; + + for ( var i = tamanho; i >= 1; i-- ) { + soma += numeros.charAt( tamanho - i ) * pos--; + if ( pos < 2 ) { + pos = 9; + } + } + + var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; + + if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) { + return false; + } + + tamanho = tamanho + 1; + numeros = value.substring( 0, tamanho ); + soma = 0; + pos = tamanho - 7; + + for ( var il = tamanho; il >= 1; il-- ) { + soma += numeros.charAt( tamanho - il ) * pos--; + if ( pos < 2 ) { + pos = 9; + } + } + + resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; + + if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) { + return false; + } + + return true; + +}, "Please specify a CNPJ value number." ); + /* * Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number. * CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation. */ -$.validator.addMethod( "cpfBR", function( value ) { +$.validator.addMethod( "cpfBR", function( value, element ) { + "use strict"; + + if ( this.optional( element ) ) { + return true; + } // Removing special characters from value value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" ); @@ -315,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value ) { } return false; -}, "Please specify a valid CPF number" ); +}, "Please specify a valid CPF number." ); // https://jqueryvalidation.org/creditcard-method/ // based on https://en.wikipedia.org/wiki/Luhn_algorithm @@ -337,7 +499,7 @@ $.validator.addMethod( "creditcard", function( value, element ) { value = value.replace( /\D/g, "" ); // Basing min and max length on - // https://developer.ean.com/general_info/Valid_Credit_Card_Types + // https://dev.ean.com/general-info/valid-card-types/ if ( value.length < 13 || value.length > 19 ) { return false; } @@ -359,7 +521,7 @@ $.validator.addMethod( "creditcard", function( value, element ) { }, "Please enter a valid credit card number." ); /* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator - * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0 + * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0 * Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings) */ $.validator.addMethod( "creditcardtypes", function( value, element, param ) { @@ -398,7 +560,7 @@ $.validator.addMethod( "creditcardtypes", function( value, element, param ) { if ( param.all ) { validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080; } - if ( validTypes & 0x0001 && /^(5[12345])/.test( value ) ) { // Mastercard + if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard return value.length === 16; } if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa @@ -468,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) { regex = new RegExp( regex ); return this.optional( element ) || regex.test( value ); -}, "Please specify a valid currency" ); +}, "Please specify a valid currency." ); $.validator.addMethod( "dateFA", function( value, element ) { return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value ); @@ -529,7 +691,31 @@ $.validator.addMethod( "extension", function( value, element, param ) { */ $.validator.addMethod( "giroaccountNL", function( value, element ) { return this.optional( element ) || /^[0-9]{1,7}$/.test( value ); -}, "Please specify a valid giro account number" ); +}, "Please specify a valid giro account number." ); + +$.validator.addMethod( "greaterThan", function( value, element, param ) { + var target = $( param ); + + if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) { + target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() { + $( element ).valid(); + } ); + } + + return value > target.val(); +}, "Please enter a greater value." ); + +$.validator.addMethod( "greaterThanEqual", function( value, element, param ) { + var target = $( param ); + + if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) { + target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() { + $( element ).valid(); + } ); + } + + return value >= target.val(); +}, "Please enter a greater value." ); /** * IBAN is the international bank account number. @@ -666,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) { cRest = cOperator % 97; } return cRest === 1; -}, "Please specify a valid IBAN" ); +}, "Please specify a valid IBAN." ); $.validator.addMethod( "integer", function( value, element ) { return this.optional( element ) || /^-?\d+$/.test( value ); -}, "A positive or negative non-decimal number please" ); +}, "A positive or negative non-decimal number please." ); $.validator.addMethod( "ipv4", function( value, element ) { return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value ); @@ -680,17 +866,103 @@ $.validator.addMethod( "ipv6", function( value, element ) { return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value ); }, "Please enter a valid IP v6 address." ); +$.validator.addMethod( "lessThan", function( value, element, param ) { + var target = $( param ); + + if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) { + target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() { + $( element ).valid(); + } ); + } + + return value < target.val(); +}, "Please enter a lesser value." ); + +$.validator.addMethod( "lessThanEqual", function( value, element, param ) { + var target = $( param ); + + if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) { + target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() { + $( element ).valid(); + } ); + } + + return value <= target.val(); +}, "Please enter a lesser value." ); + $.validator.addMethod( "lettersonly", function( value, element ) { return this.optional( element ) || /^[a-z]+$/i.test( value ); -}, "Letters only please" ); +}, "Letters only please." ); $.validator.addMethod( "letterswithbasicpunc", function( value, element ) { return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value ); -}, "Letters or punctuation only please" ); +}, "Letters or punctuation only please." ); + +// Limit the number of files in a FileList. +$.validator.addMethod( "maxfiles", function( value, element, param ) { + if ( this.optional( element ) ) { + return true; + } + + if ( $( element ).attr( "type" ) === "file" ) { + if ( element.files && element.files.length > param ) { + return false; + } + } + + return true; +}, $.validator.format( "Please select no more than {0} files." ) ); + +// Limit the size of each individual file in a FileList. +$.validator.addMethod( "maxsize", function( value, element, param ) { + if ( this.optional( element ) ) { + return true; + } + + if ( $( element ).attr( "type" ) === "file" ) { + if ( element.files && element.files.length ) { + for ( var i = 0; i < element.files.length; i++ ) { + if ( element.files[ i ].size > param ) { + return false; + } + } + } + } + + return true; +}, $.validator.format( "File size must not exceed {0} bytes each." ) ); + +// Limit the size of all files in a FileList. +$.validator.addMethod( "maxsizetotal", function( value, element, param ) { + if ( this.optional( element ) ) { + return true; + } + + if ( $( element ).attr( "type" ) === "file" ) { + if ( element.files && element.files.length ) { + var totalSize = 0; + + for ( var i = 0; i < element.files.length; i++ ) { + totalSize += element.files[ i ].size; + if ( totalSize > param ) { + return false; + } + } + } + } + + return true; +}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) ); + $.validator.addMethod( "mobileNL", function( value, element ) { return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value ); -}, "Please specify a valid mobile number" ); +}, "Please specify a valid mobile number." ); + +$.validator.addMethod( "mobileRU", function( phone_number, element ) { + var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); + return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number ); +}, "Please specify a valid mobile number." ); /* For UK phone functions, do the following server side processing: * Compare original input with this RegEx pattern: @@ -704,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) { phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); return this.optional( element ) || phone_number.length > 9 && phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ ); -}, "Please specify a valid mobile number" ); +}, "Please specify a valid mobile number." ); $.validator.addMethod( "netmask", function( value, element ) { return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value ); @@ -804,13 +1076,71 @@ $.validator.addMethod( "nipPL", function( value ) { return ( intControlNr === parseInt( value[ 9 ], 10 ) ); }, "Please specify a valid NIP number." ); +/** + * Created for project jquery-validation. + * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a + * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers + * that are being used for validation. + * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça + * @author Cleiton da Silva Mendonça + * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça + * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça + */ +$.validator.addMethod( "nisBR", function( value ) { + var number; + var cn; + var sum = 0; + var dv; + var count; + var multiplier; + + // Removing special characters from value + value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" ); + + // Checking value to have 11 digits only + if ( value.length !== 11 ) { + return false; + } + + //Get check number of value + cn = parseInt( value.substring( 10, 11 ), 10 ); + + //Get number with 10 digits of the value + number = parseInt( value.substring( 0, 10 ), 10 ); + + for ( count = 2; count < 12; count++ ) { + multiplier = count; + if ( count === 10 ) { + multiplier = 2; + } + if ( count === 11 ) { + multiplier = 3; + } + sum += ( ( number % 10 ) * multiplier ); + number = parseInt( number / 10, 10 ); + } + dv = ( sum % 11 ); + + if ( dv > 1 ) { + dv = ( 11 - dv ); + } else { + dv = 0; + } + + if ( cn === dv ) { + return true; + } else { + return false; + } +}, "Please specify a valid NIS/PIS number." ); + $.validator.addMethod( "notEqualTo", function( value, element, param ) { return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param ); }, "Please enter a different value, values must not be the same." ); $.validator.addMethod( "nowhitespace", function( value, element ) { return this.optional( element ) || /^\S+$/i.test( value ); -}, "No white space please" ); +}, "No white space please." ); /** * Return true if the field value matches the given format RegExp @@ -842,6 +1172,30 @@ $.validator.addMethod( "phoneNL", function( value, element ) { return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value ); }, "Please specify a valid phone number." ); +/** + * Polish telephone numbers have 9 digits. + * + * Mobile phone numbers starts with following digits: + * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88. + * + * Fixed-line numbers starts with area codes: + * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33, + * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61, + * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84, + * 85, 86, 87, 89, 91, 94, 95. + * + * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39. + * + * Excludes intelligent networks (premium rate, shared cost, free phone numbers). + * + * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en + */ +$.validator.addMethod( "phonePL", function( phone_number, element ) { + phone_number = phone_number.replace( /\s+/g, "" ); + var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/; + return this.optional( element ) || regexp.test( phone_number ); +}, "Please specify a valid phone number." ); + /* For UK phone functions, do the following server side processing: * Compare original input with this RegEx pattern: * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$ @@ -856,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) { phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); return this.optional( element ) || phone_number.length > 9 && phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ ); -}, "Please specify a valid uk phone number" ); +}, "Please specify a valid uk phone number." ); /* For UK phone functions, do the following server side processing: * Compare original input with this RegEx pattern: @@ -870,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) { phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); return this.optional( element ) || phone_number.length > 9 && phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ ); -}, "Please specify a valid phone number" ); +}, "Please specify a valid phone number." ); /** * Matches US phone number format @@ -891,8 +1245,8 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) { $.validator.addMethod( "phoneUS", function( phone_number, element ) { phone_number = phone_number.replace( /\s+/g, "" ); return this.optional( element ) || phone_number.length > 9 && - phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/ ); -}, "Please specify a valid phone number" ); + phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ ); +}, "Please specify a valid phone number." ); /* * Valida CEPs do brasileiros: @@ -921,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) { */ $.validator.addMethod( "postalCodeCA", function( value, element ) { return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value ); -}, "Please specify a valid postal code" ); +}, "Please specify a valid postal code." ); /* Matches Italian postcode (CAP) */ $.validator.addMethod( "postalcodeIT", function( value, element ) { return this.optional( element ) || /^\d{5}$/.test( value ); -}, "Please specify a valid postal code" ); +}, "Please specify a valid postal code." ); $.validator.addMethod( "postalcodeNL", function( value, element ) { return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value ); -}, "Please specify a valid postal code" ); +}, "Please specify a valid postal code." ); // Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK) $.validator.addMethod( "postcodeUK", function( value, element ) { return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value ); -}, "Please specify a valid UK postcode" ); +}, "Please specify a valid UK postcode." ); /* * Lets you say "at least X inputs that match selector Y must be filled." @@ -1072,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) { regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" ); return this.optional( element ) || regex.test( value ); -}, "Please specify a valid state" ); +}, "Please specify a valid state." ); // TODO check if value starts with <, otherwise don't try stripping anything $.validator.addMethod( "strippedminlength", function( value, element, param ) { return $( value ).text().length >= param; -}, $.validator.format( "Please enter at least {0} characters" ) ); +}, $.validator.format( "Please enter at least {0} characters." ) ); $.validator.addMethod( "time", function( value, element ) { return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value ); -}, "Please enter a valid time, between 00:00 and 23:59" ); +}, "Please enter a valid time, between 00:00 and 23:59." ); $.validator.addMethod( "time12h", function( value, element ) { return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value ); -}, "Please enter a valid time in 12-hour am/pm format" ); +}, "Please enter a valid time in 12-hour am/pm format." ); // Same as url, but TLD is optional $.validator.addMethod( "url2", function( value, element ) { - return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value ); + return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value ); }, $.validator.messages.url ); /** @@ -1149,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) { $.validator.addMethod( "zipcodeUS", function( value, element ) { return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value ); -}, "The specified US ZIP Code is invalid" ); +}, "The specified US ZIP Code is invalid." ); $.validator.addMethod( "ziprange", function( value, element ) { return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value ); -}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" ); +}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." ); return $; })); \ No newline at end of file diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js index 6767f24f6b12..80f14b58c2e1 100644 --- a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js +++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js @@ -1,4 +1,4 @@ -/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017 +/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022 * https://jqueryvalidation.org/ - * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */ -!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;e<=9;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;e<=10;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + + https://github.com/dotnet/runtime + 301ba1ee5d1cfff28a8866924733603f3adf4936 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -245,33 +245,33 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + + https://github.com/dotnet/runtime + 301ba1ee5d1cfff28a8866924733603f3adf4936 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + + https://github.com/dotnet/runtime + 301ba1ee5d1cfff28a8866924733603f3adf4936 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + + https://github.com/dotnet/runtime + 301ba1ee5d1cfff28a8866924733603f3adf4936 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + + https://github.com/dotnet/runtime + 301ba1ee5d1cfff28a8866924733603f3adf4936 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + + https://github.com/dotnet/runtime + 301ba1ee5d1cfff28a8866924733603f3adf4936 - - https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e40b3abf1b41621d4298642a5fd300ebf7cccf6d + + https://github.com/dotnet/runtime + 301ba1ee5d1cfff28a8866924733603f3adf4936 diff --git a/eng/Versions.props b/eng/Versions.props index c08c43481bca..81ae58ddbf63 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,12 +63,12 @@ 6.0.0 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21-servicing.23363.11 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23-servicing.23475.15 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.21-servicing.23363.11 + 6.0.23-servicing.23475.15 6.0.1 6.0.0 6.0.2 From b0468b9b0af17e4ad4be36198684741e1462bbcd Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Fri, 22 Sep 2023 18:50:04 -0700 Subject: [PATCH 60/83] Track indicators of excessive stream resets If the server has to send a lot of ENHANCE_YOUR_CALM messages or the output control flow queue is very large, there are probably a larger than expected number of client-initiated stream resets. --- .../src/Internal/Http2/Http2Connection.cs | 106 ++++++++++++++++-- .../Internal/Infrastructure/IKestrelTrace.cs | 4 + .../Internal/Infrastructure/KestrelTrace.cs | 16 +++ .../perf/Microbenchmarks/Mocks/MockTrace.cs | 2 + .../Http2SampleApp/Http2SampleApp.csproj | 2 +- .../shared/test/CompositeKestrelTrace.cs | 12 ++ 6 files changed, 134 insertions(+), 8 deletions(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs index ac3e9d166d4d..e6adcfc28dc9 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs @@ -33,6 +33,42 @@ internal partial class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeade private const PseudoHeaderFields _mandatoryRequestPseudoHeaderFields = PseudoHeaderFields.Method | PseudoHeaderFields.Path | PseudoHeaderFields.Scheme; + private const string EnhanceYourCalmMaximumCountProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.EnhanceYourCalmCount"; + private const string MaximumFlowControlQueueSizeProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.MaxConnectionFlowControlQueueSize"; + + private static readonly int _enhanceYourCalmMaximumCount = AppContext.GetData(EnhanceYourCalmMaximumCountProperty) is int eycMaxCount + ? eycMaxCount + : 10; + + // Accumulate _enhanceYourCalmCount over the course of EnhanceYourCalmTickWindowCount ticks. + // This should make bursts less likely to trigger disconnects. + private const int EnhanceYourCalmTickWindowCount = 5; + + private static bool IsEnhanceYourCalmEnabled => _enhanceYourCalmMaximumCount > 0; + + private static readonly int? ConfiguredMaximumFlowControlQueueSize = GetConfiguredMaximumFlowControlQueueSize(); + + private static int? GetConfiguredMaximumFlowControlQueueSize() + { + var data = AppContext.GetData(MaximumFlowControlQueueSizeProperty); + + if (data is int count) + { + return count; + } + + if (data is string countStr && int.TryParse(countStr, out var parsed)) + { + return parsed; + } + + return null; + } + + private readonly int _maximumFlowControlQueueSize; + + private bool IsMaximumFlowControlQueueSizeEnabled => _maximumFlowControlQueueSize > 0; + private readonly HttpConnectionContext _context; private readonly Http2FrameWriter _frameWriter; private readonly Pipe _input; @@ -40,7 +76,8 @@ internal partial class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeade private readonly int _minAllocBufferSize; private readonly HPackDecoder _hpackDecoder; private readonly InputFlowControl _inputFlowControl; - private readonly OutputFlowControl _outputFlowControl = new OutputFlowControl(new MultipleAwaitableProvider(), Http2PeerSettings.DefaultInitialWindowSize); + private readonly OutputFlowControl _outputFlowControl; + private readonly AwaitableProvider _outputFlowControlAwaitableProvider; // Keep our own reference so we can track queue size private readonly Http2PeerSettings _serverSettings = new Http2PeerSettings(); private readonly Http2PeerSettings _clientSettings = new Http2PeerSettings(); @@ -59,6 +96,9 @@ internal partial class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeade private int _clientActiveStreamCount; private int _serverActiveStreamCount; + private int _enhanceYourCalmCount; + private int _tickCount; + // The following are the only fields that can be modified outside of the ProcessRequestsAsync loop. private readonly ConcurrentQueue _completedStreams = new ConcurrentQueue(); private readonly StreamCloseAwaitable _streamCompletionAwaitable = new StreamCloseAwaitable(); @@ -88,6 +128,9 @@ public Http2Connection(HttpConnectionContext context) // Capture the ExecutionContext before dispatching HTTP/2 middleware. Will be restored by streams when processing request _context.InitialExecutionContext = ExecutionContext.Capture(); + _outputFlowControlAwaitableProvider = new MultipleAwaitableProvider(); + _outputFlowControl = new OutputFlowControl(_outputFlowControlAwaitableProvider, Http2PeerSettings.DefaultInitialWindowSize); + _frameWriter = new Http2FrameWriter( context.Transport.Output, context.ConnectionContext, @@ -129,6 +172,16 @@ public Http2Connection(HttpConnectionContext context) _serverSettings.MaxHeaderListSize = (uint)httpLimits.MaxRequestHeadersTotalSize; _serverSettings.InitialWindowSize = (uint)http2Limits.InitialStreamWindowSize; + _maximumFlowControlQueueSize = ConfiguredMaximumFlowControlQueueSize is null + ? 4 * http2Limits.MaxStreamsPerConnection + : (int)ConfiguredMaximumFlowControlQueueSize; + + if (_maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection) + { + _maximumFlowControlQueueSize = http2Limits.MaxStreamsPerConnection; + Log.LogTrace($"The configured maximum flow control queue size {ConfiguredMaximumFlowControlQueueSize} is less than the maximum streams per connection {http2Limits.MaxStreamsPerConnection} - increasing to match."); + } + // Start pool off at a smaller size if the max number of streams is less than the InitialStreamPoolSize StreamPool = new PooledStreamStack(Math.Min(InitialStreamPoolSize, http2Limits.MaxStreamsPerConnection)); @@ -352,13 +405,20 @@ public async Task ProcessRequestsAsync(IHttpApplication appl stream.Abort(new IOException(CoreStrings.Http2StreamAborted, connectionError)); } - // Use the server _serverActiveStreamCount to drain all requests on the server side. - // Can't use _clientActiveStreamCount now as we now decrement that count earlier/ - // Can't use _streams.Count as we wait for RST/END_STREAM before removing the stream from the dictionary - while (_serverActiveStreamCount > 0) + // For some reason, this loop doesn't terminate when we're trying to abort. + // Since we're making a narrow fix for a patch, we'll bypass it in such scenarios. + // TODO: This is probably a bug - something in here should probably detect aborted + // connections and short-circuit. + if (!(IsEnhanceYourCalmEnabled || IsMaximumFlowControlQueueSizeEnabled) || error is not Http2ConnectionErrorException) { - await _streamCompletionAwaitable; - UpdateCompletedStreams(); + // Use the server _serverActiveStreamCount to drain all requests on the server side. + // Can't use _clientActiveStreamCount now as we now decrement that count earlier/ + // Can't use _streams.Count as we wait for RST/END_STREAM before removing the stream from the dictionary + while (_serverActiveStreamCount > 0) + { + await _streamCompletionAwaitable; + UpdateCompletedStreams(); + } } while (StreamPool.TryPop(out var pooledStream)) @@ -1053,6 +1113,20 @@ private void StartStream() throw new Http2StreamErrorException(_currentHeadersStream.StreamId, CoreStrings.Http2ErrorMaxStreams, Http2ErrorCode.REFUSED_STREAM); } + if (IsMaximumFlowControlQueueSizeEnabled && _outputFlowControlAwaitableProvider.ActiveCount > _maximumFlowControlQueueSize) + { + Log.Http2FlowControlQueueOperationsExceeded(_context.ConnectionId, _maximumFlowControlQueueSize); + + // Now that we've logged a useful message, we can put vague text in the exception + // messages in case they somehow make it back to the client (not expected) + + // This will close the socket - we want to do that right away + Abort(new ConnectionAbortedException("HTTP/2 connection exceeded the outgoing flow control maximum queue size.")); + + // Throwing an exception as well will help us clean up on our end more quickly by (e.g.) skipping processing of already-buffered input + throw new Http2ConnectionErrorException(CoreStrings.Http2ConnectionFaulted, Http2ErrorCode.INTERNAL_ERROR); + } + // We don't use the _serverActiveRequestCount here as during shutdown, it and the dictionary counts get out of sync. // The streams still exist in the dictionary until the client responds with a RST or END_STREAM. // Also, we care about the dictionary size for too much memory consumption. @@ -1061,6 +1135,20 @@ private void StartStream() // Server is getting hit hard with connection resets. // Tell client to calm down. // TODO consider making when to send ENHANCE_YOUR_CALM configurable? + + if (IsEnhanceYourCalmEnabled && Interlocked.Increment(ref _enhanceYourCalmCount) > EnhanceYourCalmTickWindowCount * _enhanceYourCalmMaximumCount) + { + Log.Http2TooManyEnhanceYourCalms(_context.ConnectionId, _enhanceYourCalmMaximumCount); + + // Now that we've logged a useful message, we can put vague text in the exception + // messages in case they somehow make it back to the client (not expected) + + // This will close the socket - we want to do that right away + Abort(new ConnectionAbortedException(CoreStrings.Http2ConnectionFaulted)); + // Throwing an exception as well will help us clean up on our end more quickly by (e.g.) skipping processing of already-buffered input + throw new Http2ConnectionErrorException(CoreStrings.Http2ConnectionFaulted, Http2ErrorCode.ENHANCE_YOUR_CALM); + } + throw new Http2StreamErrorException(_currentHeadersStream.StreamId, CoreStrings.Http2TellClientToCalmDown, Http2ErrorCode.ENHANCE_YOUR_CALM); } } @@ -1123,6 +1211,10 @@ private void AbortStream(int streamId, IOException error) void IRequestProcessor.Tick(DateTimeOffset now) { Input.CancelPendingRead(); + if (IsEnhanceYourCalmEnabled && ++_tickCount % EnhanceYourCalmTickWindowCount == 0) + { + Interlocked.Exchange(ref _enhanceYourCalmCount, 0); + } } void IHttp2StreamLifetimeHandler.OnStreamCompleted(Http2Stream stream) diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs index 6a75f4657b14..6fb38405572f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs @@ -78,8 +78,12 @@ internal interface IKestrelTrace : ILogger void Http2FrameSending(string connectionId, Http2Frame frame); + void Http2TooManyEnhanceYourCalms(string connectionId, int count); + void Http2MaxConcurrentStreamsReached(string connectionId); + void Http2FlowControlQueueOperationsExceeded(string connectionId, int count); + void InvalidResponseHeaderRemoved(); void Http3ConnectionError(string connectionId, Http3ConnectionErrorException ex); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs index 3c3b7bc4af07..364c5ed0f252 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs @@ -395,6 +395,22 @@ public void Http3GoAwayStreamId(string connectionId, long goAwayStreamId) Http3GoAwayStreamId(_http3Logger, connectionId, goAwayStreamId); } + [LoggerMessage(54, LogLevel.Error, @"Connection id ""{ConnectionId}"" aborted since at least ""{Count}"" ENHANCE_YOUR_CALM responses were required per second.", EventName = "Http2TooManyEnhanceYourCalms")] + private static partial void Http2TooManyEnhanceYourCalms(ILogger logger, string connectionId, int count); + + public void Http2TooManyEnhanceYourCalms(string connectionId, int count) + { + Http2TooManyEnhanceYourCalms(_http2Logger, connectionId, count); + } + + [LoggerMessage(55, LogLevel.Error, @"Connection id ""{ConnectionId}"" exceeded the output flow control maximum queue size of ""{Count}"".", EventName = "Http2FlowControlQueueOperationsExceeded")] + private static partial void Http2FlowControlQueueOperationsExceeded(ILogger logger, string connectionId, int count); + + public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count) + { + Http2FlowControlQueueOperationsExceeded(_http3Logger, connectionId, count); + } + public virtual void Log(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func formatter) => _generalLogger.Log(logLevel, eventId, state, exception, formatter); diff --git a/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs b/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs index 7a87e2ee4041..ce71ea8255d9 100644 --- a/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs +++ b/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs @@ -59,7 +59,9 @@ public void Http2ConnectionClosing(string connectionId) { } public void Http2ConnectionClosed(string connectionId, int highestOpenedStreamId) { } public void Http2FrameReceived(string connectionId, Http2Frame frame) { } public void Http2FrameSending(string connectionId, Http2Frame frame) { } + public void Http2TooManyEnhanceYourCalms(string connectionId, int count) { } public void Http2MaxConcurrentStreamsReached(string connectionId) { } + public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count) { } public void InvalidResponseHeaderRemoved() { } public void Http3ConnectionError(string connectionId, Http3ConnectionErrorException ex) { } public void Http3ConnectionClosing(string connectionId) { } diff --git a/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj b/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj index cc404533ad8f..d0930e69fee0 100644 --- a/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj +++ b/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj @@ -1,4 +1,4 @@ - + $(DefaultNetCoreTargetFramework) diff --git a/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs b/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs index 523e77a059ac..cede2f59521c 100644 --- a/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs +++ b/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs @@ -234,12 +234,24 @@ public void Http2FrameSending(string connectionId, Http2Frame frame) _trace2.Http2FrameSending(connectionId, frame); } + public void Http2TooManyEnhanceYourCalms(string connectionId, int count) + { + _trace1.Http2TooManyEnhanceYourCalms(connectionId, count); + _trace2.Http2TooManyEnhanceYourCalms(connectionId, count); + } + public void Http2MaxConcurrentStreamsReached(string connectionId) { _trace1.Http2MaxConcurrentStreamsReached(connectionId); _trace2.Http2MaxConcurrentStreamsReached(connectionId); } + public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count) + { + _trace1.Http2FlowControlQueueOperationsExceeded(connectionId, count); + _trace2.Http2FlowControlQueueOperationsExceeded(connectionId, count); + } + public void InvalidResponseHeaderRemoved() { _trace1.InvalidResponseHeaderRemoved(); From 2a8a47bc1b6f787e165c57b19a0ff2048d33371a Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Tue, 26 Sep 2023 17:58:44 -0700 Subject: [PATCH 61/83] Address PR feedback --- .../src/Internal/Http2/Http2Connection.cs | 23 +++++++++++++++---- .../Internal/Infrastructure/IKestrelTrace.cs | 2 ++ .../Internal/Infrastructure/KestrelTrace.cs | 12 ++++++++-- .../perf/Microbenchmarks/Mocks/MockTrace.cs | 1 + .../shared/test/CompositeKestrelTrace.cs | 6 +++++ 5 files changed, 37 insertions(+), 7 deletions(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs index e6adcfc28dc9..34069616c6e3 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs @@ -36,9 +36,22 @@ internal partial class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeade private const string EnhanceYourCalmMaximumCountProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.EnhanceYourCalmCount"; private const string MaximumFlowControlQueueSizeProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.MaxConnectionFlowControlQueueSize"; - private static readonly int _enhanceYourCalmMaximumCount = AppContext.GetData(EnhanceYourCalmMaximumCountProperty) is int eycMaxCount - ? eycMaxCount - : 10; + private static readonly int _enhanceYourCalmMaximumCount = GetEnhanceYourCalmMaximumCount(); + + private static int GetEnhanceYourCalmMaximumCount() + { + var data = AppContext.GetData(EnhanceYourCalmMaximumCountProperty); + if (data is int count) + { + return count; + } + if (data is string countStr && int.TryParse(countStr, out var parsed)) + { + return parsed; + } + + return 20; // Empirically derived + } // Accumulate _enhanceYourCalmCount over the course of EnhanceYourCalmTickWindowCount ticks. // This should make bursts less likely to trigger disconnects. @@ -176,10 +189,10 @@ public Http2Connection(HttpConnectionContext context) ? 4 * http2Limits.MaxStreamsPerConnection : (int)ConfiguredMaximumFlowControlQueueSize; - if (_maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection) + if (IsMaximumFlowControlQueueSizeEnabled && _maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection) { + Log.Http2FlowControlQueueMaximumTooLow(context.ConnectionId, http2Limits.MaxStreamsPerConnection, _maximumFlowControlQueueSize); _maximumFlowControlQueueSize = http2Limits.MaxStreamsPerConnection; - Log.LogTrace($"The configured maximum flow control queue size {ConfiguredMaximumFlowControlQueueSize} is less than the maximum streams per connection {http2Limits.MaxStreamsPerConnection} - increasing to match."); } // Start pool off at a smaller size if the max number of streams is less than the InitialStreamPoolSize diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs index 6fb38405572f..28b7b5cd8b05 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs @@ -84,6 +84,8 @@ internal interface IKestrelTrace : ILogger void Http2FlowControlQueueOperationsExceeded(string connectionId, int count); + void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual); + void InvalidResponseHeaderRemoved(); void Http3ConnectionError(string connectionId, Http3ConnectionErrorException ex); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs index 364c5ed0f252..439fb69fbec4 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs @@ -395,7 +395,7 @@ public void Http3GoAwayStreamId(string connectionId, long goAwayStreamId) Http3GoAwayStreamId(_http3Logger, connectionId, goAwayStreamId); } - [LoggerMessage(54, LogLevel.Error, @"Connection id ""{ConnectionId}"" aborted since at least ""{Count}"" ENHANCE_YOUR_CALM responses were required per second.", EventName = "Http2TooManyEnhanceYourCalms")] + [LoggerMessage(54, LogLevel.Debug, @"Connection id ""{ConnectionId}"" aborted since at least ""{Count}"" ENHANCE_YOUR_CALM responses were required per second.", EventName = "Http2TooManyEnhanceYourCalms")] private static partial void Http2TooManyEnhanceYourCalms(ILogger logger, string connectionId, int count); public void Http2TooManyEnhanceYourCalms(string connectionId, int count) @@ -403,7 +403,7 @@ public void Http2TooManyEnhanceYourCalms(string connectionId, int count) Http2TooManyEnhanceYourCalms(_http2Logger, connectionId, count); } - [LoggerMessage(55, LogLevel.Error, @"Connection id ""{ConnectionId}"" exceeded the output flow control maximum queue size of ""{Count}"".", EventName = "Http2FlowControlQueueOperationsExceeded")] + [LoggerMessage(55, LogLevel.Debug, @"Connection id ""{ConnectionId}"" exceeded the output flow control maximum queue size of ""{Count}"".", EventName = "Http2FlowControlQueueOperationsExceeded")] private static partial void Http2FlowControlQueueOperationsExceeded(ILogger logger, string connectionId, int count); public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count) @@ -411,6 +411,14 @@ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int cou Http2FlowControlQueueOperationsExceeded(_http3Logger, connectionId, count); } + [LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size ""{Actual}"" is less than the maximum streams per connection ""{Expected}"" - increasing to match.", EventName = "Http2FlowControlQueueMaximumTooLow")] + private static partial void Http2FlowControlQueueMaximumTooLow(ILogger logger, string connectionId, int expected, int actual); + + public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual) + { + Http2FlowControlQueueMaximumTooLow(_http3Logger, connectionId, expected, actual); + } + public virtual void Log(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func formatter) => _generalLogger.Log(logLevel, eventId, state, exception, formatter); diff --git a/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs b/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs index ce71ea8255d9..c9052461b9ed 100644 --- a/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs +++ b/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs @@ -62,6 +62,7 @@ public void Http2FrameSending(string connectionId, Http2Frame frame) { } public void Http2TooManyEnhanceYourCalms(string connectionId, int count) { } public void Http2MaxConcurrentStreamsReached(string connectionId) { } public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count) { } + public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual) { } public void InvalidResponseHeaderRemoved() { } public void Http3ConnectionError(string connectionId, Http3ConnectionErrorException ex) { } public void Http3ConnectionClosing(string connectionId) { } diff --git a/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs b/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs index cede2f59521c..1245abfd2a4b 100644 --- a/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs +++ b/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs @@ -252,6 +252,12 @@ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int cou _trace2.Http2FlowControlQueueOperationsExceeded(connectionId, count); } + public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual) + { + _trace1.Http2FlowControlQueueMaximumTooLow(connectionId, expected, actual); + _trace2.Http2FlowControlQueueMaximumTooLow(connectionId, expected, actual); + } + public void InvalidResponseHeaderRemoved() { _trace1.InvalidResponseHeaderRemoved(); From 7d6aec8e0b8a011b13ec29c56d8d1223b40fee02 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Tue, 26 Sep 2023 20:00:09 -0700 Subject: [PATCH 62/83] Address PR feedback --- .../Core/src/Internal/Http2/Http2Connection.cs | 12 +++++++----- .../Core/src/Internal/Infrastructure/KestrelTrace.cs | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs index 34069616c6e3..5280f3e2b275 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs @@ -33,14 +33,14 @@ internal partial class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeade private const PseudoHeaderFields _mandatoryRequestPseudoHeaderFields = PseudoHeaderFields.Method | PseudoHeaderFields.Path | PseudoHeaderFields.Scheme; - private const string EnhanceYourCalmMaximumCountProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.EnhanceYourCalmCount"; + private const string MaximumEnhanceYourCalmCountProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.MaxEnhanceYourCalmCount"; private const string MaximumFlowControlQueueSizeProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.MaxConnectionFlowControlQueueSize"; - private static readonly int _enhanceYourCalmMaximumCount = GetEnhanceYourCalmMaximumCount(); + private static readonly int _enhanceYourCalmMaximumCount = GetMaximumEnhanceYourCalmCount(); - private static int GetEnhanceYourCalmMaximumCount() + private static int GetMaximumEnhanceYourCalmCount() { - var data = AppContext.GetData(EnhanceYourCalmMaximumCountProperty); + var data = AppContext.GetData(MaximumEnhanceYourCalmCountProperty); if (data is int count) { return count; @@ -186,7 +186,7 @@ public Http2Connection(HttpConnectionContext context) _serverSettings.InitialWindowSize = (uint)http2Limits.InitialStreamWindowSize; _maximumFlowControlQueueSize = ConfiguredMaximumFlowControlQueueSize is null - ? 4 * http2Limits.MaxStreamsPerConnection + ? 4 * http2Limits.MaxStreamsPerConnection // 4 is a magic number to give us some padding above the expected maximum size : (int)ConfiguredMaximumFlowControlQueueSize; if (IsMaximumFlowControlQueueSizeEnabled && _maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection) @@ -1224,6 +1224,8 @@ private void AbortStream(int streamId, IOException error) void IRequestProcessor.Tick(DateTimeOffset now) { Input.CancelPendingRead(); + // We count EYCs over a window of a given length to avoid flagging short-lived bursts. + // At the end of each window, reset the count. if (IsEnhanceYourCalmEnabled && ++_tickCount % EnhanceYourCalmTickWindowCount == 0) { Interlocked.Exchange(ref _enhanceYourCalmCount, 0); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs index 439fb69fbec4..6a9279e5a3f0 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs @@ -395,7 +395,7 @@ public void Http3GoAwayStreamId(string connectionId, long goAwayStreamId) Http3GoAwayStreamId(_http3Logger, connectionId, goAwayStreamId); } - [LoggerMessage(54, LogLevel.Debug, @"Connection id ""{ConnectionId}"" aborted since at least ""{Count}"" ENHANCE_YOUR_CALM responses were required per second.", EventName = "Http2TooManyEnhanceYourCalms")] + [LoggerMessage(54, LogLevel.Debug, @"Connection id ""{ConnectionId}"" aborted since at least {Count} ENHANCE_YOUR_CALM responses were recorded per second.", EventName = "Http2TooManyEnhanceYourCalms")] private static partial void Http2TooManyEnhanceYourCalms(ILogger logger, string connectionId, int count); public void Http2TooManyEnhanceYourCalms(string connectionId, int count) @@ -403,7 +403,7 @@ public void Http2TooManyEnhanceYourCalms(string connectionId, int count) Http2TooManyEnhanceYourCalms(_http2Logger, connectionId, count); } - [LoggerMessage(55, LogLevel.Debug, @"Connection id ""{ConnectionId}"" exceeded the output flow control maximum queue size of ""{Count}"".", EventName = "Http2FlowControlQueueOperationsExceeded")] + [LoggerMessage(55, LogLevel.Debug, @"Connection id ""{ConnectionId}"" exceeded the output flow control maximum queue size of {Count}.", EventName = "Http2FlowControlQueueOperationsExceeded")] private static partial void Http2FlowControlQueueOperationsExceeded(ILogger logger, string connectionId, int count); public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count) @@ -411,7 +411,7 @@ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int cou Http2FlowControlQueueOperationsExceeded(_http3Logger, connectionId, count); } - [LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size ""{Actual}"" is less than the maximum streams per connection ""{Expected}"" - increasing to match.", EventName = "Http2FlowControlQueueMaximumTooLow")] + [LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size {Actual} is less than the maximum streams per connection {Expected}. Increasing configured value to {Expected}.", EventName = "Http2FlowControlQueueMaximumTooLow")] private static partial void Http2FlowControlQueueMaximumTooLow(ILogger logger, string connectionId, int expected, int actual); public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual) From 95bb0b8c16d3b27d41296a5a44f9f3b5d54d4a05 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Tue, 26 Sep 2023 20:04:26 -0700 Subject: [PATCH 63/83] Increase the min max queue size to match 7 and 8 --- .../Kestrel/Core/src/Internal/Http2/Http2Connection.cs | 7 ++++--- .../Core/src/Internal/Infrastructure/KestrelTrace.cs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs index 5280f3e2b275..2e4a208fcc4e 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs @@ -189,10 +189,11 @@ public Http2Connection(HttpConnectionContext context) ? 4 * http2Limits.MaxStreamsPerConnection // 4 is a magic number to give us some padding above the expected maximum size : (int)ConfiguredMaximumFlowControlQueueSize; - if (IsMaximumFlowControlQueueSizeEnabled && _maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection) + var minimumMaximumFlowControlQueueSize = 2 * http2Limits.MaxStreamsPerConnection; // Double to match 7.0 and 8.0 + if (IsMaximumFlowControlQueueSizeEnabled && _maximumFlowControlQueueSize < minimumMaximumFlowControlQueueSize) { - Log.Http2FlowControlQueueMaximumTooLow(context.ConnectionId, http2Limits.MaxStreamsPerConnection, _maximumFlowControlQueueSize); - _maximumFlowControlQueueSize = http2Limits.MaxStreamsPerConnection; + Log.Http2FlowControlQueueMaximumTooLow(context.ConnectionId, minimumMaximumFlowControlQueueSize, _maximumFlowControlQueueSize); + _maximumFlowControlQueueSize = minimumMaximumFlowControlQueueSize; } // Start pool off at a smaller size if the max number of streams is less than the InitialStreamPoolSize diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs index 6a9279e5a3f0..c1a6021549f5 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs @@ -411,7 +411,7 @@ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int cou Http2FlowControlQueueOperationsExceeded(_http3Logger, connectionId, count); } - [LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size {Actual} is less than the maximum streams per connection {Expected}. Increasing configured value to {Expected}.", EventName = "Http2FlowControlQueueMaximumTooLow")] + [LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size {Actual} is less than double the maximum streams per connection {Expected}. Increasing configured value to {Expected}.", EventName = "Http2FlowControlQueueMaximumTooLow")] private static partial void Http2FlowControlQueueMaximumTooLow(ILogger logger, string connectionId, int expected, int actual); public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual) From 1d49c492e467318607e5874fc6af645115fd0434 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Thu, 28 Sep 2023 01:32:29 +0000 Subject: [PATCH 64/83] Merged PR 33993: [internal/release/frameshift/6.0] Update dependencies from dnceng/internal/dotnet-efcore This pull request updates the following dependencies [marker]: <> (Begin:5290da81-c92c-4654-752d-08dbbf92e774) ## From https://github.com/dotnet/efcore - **Subscription**: 5290da81-c92c-4654-752d-08dbbf92e774 - **Build**: 20230927.15 - **Date Produced**: September 28, 2023 1:08:02 AM UTC - **Commit**: 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 - **Branch**: refs/heads/internal/release/frameshift/6.0 [DependencyUpdate]: <> (Begin) - **Updates**: - **dotnet-ef**: [from 6.0.21 to 6.0.23][1] - **Microsoft.EntityFrameworkCore**: [from 6.0.21 to 6.0.23][1] - **Microsoft.EntityFrameworkCore.Design**: [from 6.0.21 to 6.0.23][1] - **Microsoft.EntityFrameworkCore.InMemory**: [from 6.0.21 to 6.0.23][1] - **Microsoft.EntityFrameworkCore.Relational**: [from 6.0.21 to 6.0.23][1] - **Microsoft.EntityFrameworkCore.Sqlite**: [from 6.0.21 to 6.0.23][1] - **Microsoft.EntityFrameworkCore.SqlServer**: [from 6.0.21 to 6.0.23][1] - **Microsoft.EntityFrameworkCore.Tools**: [from 6.0.21 to 6.0.23][1] [1]: https://github.com/dotnet/efcore/compare/fa741b8bad...50a6896cca [DependencyUpdate]: <> (End) [marker]: <> (End:5290da81-c92c-4654-752d-08dbbf92e774) --- NuGet.config | 2 ++ eng/Version.Details.xml | 48 ++++++++++++++++++++--------------------- eng/Versions.props | 16 +++++++------- 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7c42342bf5ad..8bbcc5e342e0 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,6 +7,7 @@ + @@ -24,6 +25,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9af5757a4c2a..ed44928afcc8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - - https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + + https://github.com/dotnet/efcore + 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 - - https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + + https://github.com/dotnet/efcore + 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 - - https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + + https://github.com/dotnet/efcore + 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 - - https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + + https://github.com/dotnet/efcore + 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 - - https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + + https://github.com/dotnet/efcore + 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 - - https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + + https://github.com/dotnet/efcore + 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 - - https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + + https://github.com/dotnet/efcore + 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 - - https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - fa741b8bad8eebb503bba99e078538f97aff3f5d + + https://github.com/dotnet/efcore + 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 81ae58ddbf63..39fb8e05250c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -122,14 +122,14 @@ 6.0.11 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 - 6.0.21 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 + 6.0.23 6.0.0-beta.23408.5 6.0.0-beta.23408.5 From b1eee58b6f09b977a5ab9c49f5da5904bee421c8 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Sat, 30 Sep 2023 00:13:18 +0000 Subject: [PATCH 65/83] Update dependencies from https://github.com/dotnet/runtime build 20230929.5 Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport From Version 6.0.23-servicing.23475.15 -> To Version 6.0.23-servicing.23479.5 --- NuGet.config | 8 ++++++-- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/NuGet.config b/NuGet.config index 8bbcc5e342e0..22c8c5eb5bb8 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,12 @@ - + + + @@ -25,10 +27,12 @@ + + - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ed44928afcc8..160770633949 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,7 +177,7 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://github.com/dotnet/runtime 301ba1ee5d1cfff28a8866924733603f3adf4936 @@ -269,7 +269,7 @@ https://github.com/dotnet/runtime 301ba1ee5d1cfff28a8866924733603f3adf4936 - + https://github.com/dotnet/runtime 301ba1ee5d1cfff28a8866924733603f3adf4936 diff --git a/eng/Versions.props b/eng/Versions.props index 39fb8e05250c..5c43c68802dd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.23 6.0.23 6.0.23 - 6.0.23-servicing.23475.15 + 6.0.23-servicing.23479.5 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.23-servicing.23475.15 + 6.0.23-servicing.23479.5 6.0.1 6.0.0 6.0.2 From fc82f0d6e59d13c81fae92f775de1cfbfc1a4000 Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Wed, 6 Sep 2023 10:40:25 -0700 Subject: [PATCH 66/83] Update jquery-validation to v1.19.5 (#50484) --- .../Pages/V4/_ValidationScriptsPartial.cshtml | 4 +- .../Pages/V5/_ValidationScriptsPartial.cshtml | 4 +- src/Identity/UI/src/THIRD-PARTY-NOTICES.txt | 2 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- .../Shared/_ValidationScriptsPartial.cshtml | 2 +- .../Shared/_ValidationScriptsPartial.cshtml | 2 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- src/ProjectTemplates/THIRD-PARTY-NOTICES | 2 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- .../dist/additional-methods.js | 424 +++++- .../dist/additional-methods.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 118 +- .../dist/jquery.validate.min.js | 6 +- .../samples/ClaimsTransformation/bower.json | 2 +- .../wwwroot/lib/jquery-validation/.bower.json | 16 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../dist/additional-methods.min.js | 8 +- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../dist/jquery.validate.min.js | 8 +- .../wwwroot/lib/jquery/.bower.json | 2 +- .../wwwroot/lib/jquery/dist/jquery.min.map | 2 +- src/Security/samples/Cookies/bower.json | 2 +- .../wwwroot/lib/jquery-validation/.bower.json | 16 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../dist/additional-methods.min.js | 8 +- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../dist/jquery.validate.min.js | 8 +- .../Cookies/wwwroot/lib/jquery/.bower.json | 2 +- .../wwwroot/lib/jquery/dist/jquery.min.map | 2 +- .../wwwroot/lib/jquery-validation/.bower.json | 19 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../wwwroot/lib/jquery-validation/.bower.json | 19 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../samples/PathSchemeSelection/bower.json | 2 +- .../wwwroot/lib/jquery-validation/.bower.json | 16 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../dist/additional-methods.min.js | 8 +- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../dist/jquery.validate.min.js | 8 +- .../wwwroot/lib/jquery/.bower.json | 2 +- .../wwwroot/lib/jquery/dist/jquery.min.map | 2 +- .../wwwroot/lib/jquery-validation/.bower.json | 19 +- .../dist/additional-methods.js | 1264 ++++++++++++----- .../dist/additional-methods.min.js | 8 +- .../jquery-validation/dist/jquery.validate.js | 855 +++++++---- .../dist/jquery.validate.min.js | 8 +- 65 files changed, 11695 insertions(+), 4546 deletions(-) diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml index 74ca36266548..a67a209cbe94 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml @@ -3,11 +3,11 @@ - - + diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml index 6cd4eed86820..da4aebe98a86 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml @@ -1,2 +1,2 @@ - + diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js index e129bc0f74b9..c6a7229185ab 100644 --- a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js +++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js @@ -1,9 +1,9 @@ /*! - * jQuery Validation Plugin v1.17.0 + * jQuery Validation Plugin v1.19.5 * * https://jqueryvalidation.org/ * - * Copyright (c) 2017 Jörn Zaefferer + * Copyright (c) 2022 Jörn Zaefferer * Released under the MIT license */ (function( factory ) { @@ -43,6 +43,38 @@ }() ); +/** + * This is used in the United States to process payments, deposits, + * or transfers using the Automated Clearing House (ACH) or Fedwire + * systems. A very common use case would be to validate a form for + * an ACH bill payment. + */ +$.validator.addMethod( "abaRoutingNumber", function( value ) { + var checksum = 0; + var tokens = value.split( "" ); + var length = tokens.length; + + // Length Check + if ( length !== 9 ) { + return false; + } + + // Calc the checksum + // https://en.wikipedia.org/wiki/ABA_routing_transit_number + for ( var i = 0; i < length; i += 3 ) { + checksum += parseInt( tokens[ i ], 10 ) * 3 + + parseInt( tokens[ i + 1 ], 10 ) * 7 + + parseInt( tokens[ i + 2 ], 10 ); + } + + // If not zero and divisible by 10 then valid + if ( checksum !== 0 && checksum % 10 === 0 ) { + return true; + } + + return false; +}, "Please enter a valid routing number." ); + // Accept a value from a file input based on a required mimetype $.validator.addMethod( "accept", function( value, element, param ) { @@ -87,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) { $.validator.addMethod( "alphanumeric", function( value, element ) { return this.optional( element ) || /^\w+$/i.test( value ); -}, "Letters, numbers, and underscores only please" ); +}, "Letters, numbers, and underscores only please." ); /* * Dutch bank account numbers (not 'giro' numbers) have 9 digits @@ -114,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) { sum = sum + factor * digit; } return sum % 11 === 0; -}, "Please specify a valid bank account number" ); +}, "Please specify a valid bank account number." ); $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) { return this.optional( element ) || ( $.validator.methods.bankaccountNL.call( this, value, element ) ) || ( $.validator.methods.giroaccountNL.call( this, value, element ) ); -}, "Please specify a valid bank or giro account number" ); +}, "Please specify a valid bank or giro account number." ); /** * BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity. @@ -139,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) { */ $.validator.addMethod( "bic", function( value, element ) { return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() ); -}, "Please specify a valid BIC code" ); +}, "Please specify a valid BIC code." ); /* * Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities @@ -256,11 +288,141 @@ $.validator.addMethod( "cifES", function( value, element ) { }, "Please specify a valid CIF number." ); +/* + * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number. + * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation. + */ +$.validator.addMethod( "cnhBR", function( value ) { + + // Removing special characters from value + value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" ); + + // Checking value to have 11 digits only + if ( value.length !== 11 ) { + return false; + } + + var sum = 0, dsc = 0, firstChar, + firstCN, secondCN, i, j, v; + + firstChar = value.charAt( 0 ); + + if ( new Array( 12 ).join( firstChar ) === value ) { + return false; + } + + // Step 1 - using first Check Number: + for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) { + sum += +( value.charAt( i ) * j ); + } + + firstCN = sum % 11; + if ( firstCN >= 10 ) { + firstCN = 0; + dsc = 2; + } + + sum = 0; + for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) { + sum += +( value.charAt( i ) * j ); + } + + secondCN = sum % 11; + if ( secondCN >= 10 ) { + secondCN = 0; + } else { + secondCN = secondCN - dsc; + } + + return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) ); + +}, "Please specify a valid CNH number." ); + +/* + * Brazillian value number (Cadastrado de Pessoas Juridica). + * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation. + */ +$.validator.addMethod( "cnpjBR", function( value, element ) { + "use strict"; + + if ( this.optional( element ) ) { + return true; + } + + // Removing no number + value = value.replace( /[^\d]+/g, "" ); + + // Checking value to have 14 digits only + if ( value.length !== 14 ) { + return false; + } + + // Elimina values invalidos conhecidos + if ( value === "00000000000000" || + value === "11111111111111" || + value === "22222222222222" || + value === "33333333333333" || + value === "44444444444444" || + value === "55555555555555" || + value === "66666666666666" || + value === "77777777777777" || + value === "88888888888888" || + value === "99999999999999" ) { + return false; + } + + // Valida DVs + var tamanho = ( value.length - 2 ); + var numeros = value.substring( 0, tamanho ); + var digitos = value.substring( tamanho ); + var soma = 0; + var pos = tamanho - 7; + + for ( var i = tamanho; i >= 1; i-- ) { + soma += numeros.charAt( tamanho - i ) * pos--; + if ( pos < 2 ) { + pos = 9; + } + } + + var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; + + if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) { + return false; + } + + tamanho = tamanho + 1; + numeros = value.substring( 0, tamanho ); + soma = 0; + pos = tamanho - 7; + + for ( var il = tamanho; il >= 1; il-- ) { + soma += numeros.charAt( tamanho - il ) * pos--; + if ( pos < 2 ) { + pos = 9; + } + } + + resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; + + if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) { + return false; + } + + return true; + +}, "Please specify a CNPJ value number." ); + /* * Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number. * CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation. */ -$.validator.addMethod( "cpfBR", function( value ) { +$.validator.addMethod( "cpfBR", function( value, element ) { + "use strict"; + + if ( this.optional( element ) ) { + return true; + } // Removing special characters from value value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" ); @@ -315,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value ) { } return false; -}, "Please specify a valid CPF number" ); +}, "Please specify a valid CPF number." ); // https://jqueryvalidation.org/creditcard-method/ // based on https://en.wikipedia.org/wiki/Luhn_algorithm @@ -337,7 +499,7 @@ $.validator.addMethod( "creditcard", function( value, element ) { value = value.replace( /\D/g, "" ); // Basing min and max length on - // https://developer.ean.com/general_info/Valid_Credit_Card_Types + // https://dev.ean.com/general-info/valid-card-types/ if ( value.length < 13 || value.length > 19 ) { return false; } @@ -359,7 +521,7 @@ $.validator.addMethod( "creditcard", function( value, element ) { }, "Please enter a valid credit card number." ); /* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator - * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0 + * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0 * Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings) */ $.validator.addMethod( "creditcardtypes", function( value, element, param ) { @@ -398,7 +560,7 @@ $.validator.addMethod( "creditcardtypes", function( value, element, param ) { if ( param.all ) { validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080; } - if ( validTypes & 0x0001 && /^(5[12345])/.test( value ) ) { // Mastercard + if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard return value.length === 16; } if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa @@ -468,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) { regex = new RegExp( regex ); return this.optional( element ) || regex.test( value ); -}, "Please specify a valid currency" ); +}, "Please specify a valid currency." ); $.validator.addMethod( "dateFA", function( value, element ) { return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value ); @@ -529,7 +691,31 @@ $.validator.addMethod( "extension", function( value, element, param ) { */ $.validator.addMethod( "giroaccountNL", function( value, element ) { return this.optional( element ) || /^[0-9]{1,7}$/.test( value ); -}, "Please specify a valid giro account number" ); +}, "Please specify a valid giro account number." ); + +$.validator.addMethod( "greaterThan", function( value, element, param ) { + var target = $( param ); + + if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) { + target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() { + $( element ).valid(); + } ); + } + + return value > target.val(); +}, "Please enter a greater value." ); + +$.validator.addMethod( "greaterThanEqual", function( value, element, param ) { + var target = $( param ); + + if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) { + target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() { + $( element ).valid(); + } ); + } + + return value >= target.val(); +}, "Please enter a greater value." ); /** * IBAN is the international bank account number. @@ -666,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) { cRest = cOperator % 97; } return cRest === 1; -}, "Please specify a valid IBAN" ); +}, "Please specify a valid IBAN." ); $.validator.addMethod( "integer", function( value, element ) { return this.optional( element ) || /^-?\d+$/.test( value ); -}, "A positive or negative non-decimal number please" ); +}, "A positive or negative non-decimal number please." ); $.validator.addMethod( "ipv4", function( value, element ) { return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value ); @@ -680,17 +866,103 @@ $.validator.addMethod( "ipv6", function( value, element ) { return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value ); }, "Please enter a valid IP v6 address." ); +$.validator.addMethod( "lessThan", function( value, element, param ) { + var target = $( param ); + + if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) { + target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() { + $( element ).valid(); + } ); + } + + return value < target.val(); +}, "Please enter a lesser value." ); + +$.validator.addMethod( "lessThanEqual", function( value, element, param ) { + var target = $( param ); + + if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) { + target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() { + $( element ).valid(); + } ); + } + + return value <= target.val(); +}, "Please enter a lesser value." ); + $.validator.addMethod( "lettersonly", function( value, element ) { return this.optional( element ) || /^[a-z]+$/i.test( value ); -}, "Letters only please" ); +}, "Letters only please." ); $.validator.addMethod( "letterswithbasicpunc", function( value, element ) { return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value ); -}, "Letters or punctuation only please" ); +}, "Letters or punctuation only please." ); + +// Limit the number of files in a FileList. +$.validator.addMethod( "maxfiles", function( value, element, param ) { + if ( this.optional( element ) ) { + return true; + } + + if ( $( element ).attr( "type" ) === "file" ) { + if ( element.files && element.files.length > param ) { + return false; + } + } + + return true; +}, $.validator.format( "Please select no more than {0} files." ) ); + +// Limit the size of each individual file in a FileList. +$.validator.addMethod( "maxsize", function( value, element, param ) { + if ( this.optional( element ) ) { + return true; + } + + if ( $( element ).attr( "type" ) === "file" ) { + if ( element.files && element.files.length ) { + for ( var i = 0; i < element.files.length; i++ ) { + if ( element.files[ i ].size > param ) { + return false; + } + } + } + } + + return true; +}, $.validator.format( "File size must not exceed {0} bytes each." ) ); + +// Limit the size of all files in a FileList. +$.validator.addMethod( "maxsizetotal", function( value, element, param ) { + if ( this.optional( element ) ) { + return true; + } + + if ( $( element ).attr( "type" ) === "file" ) { + if ( element.files && element.files.length ) { + var totalSize = 0; + + for ( var i = 0; i < element.files.length; i++ ) { + totalSize += element.files[ i ].size; + if ( totalSize > param ) { + return false; + } + } + } + } + + return true; +}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) ); + $.validator.addMethod( "mobileNL", function( value, element ) { return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value ); -}, "Please specify a valid mobile number" ); +}, "Please specify a valid mobile number." ); + +$.validator.addMethod( "mobileRU", function( phone_number, element ) { + var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); + return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number ); +}, "Please specify a valid mobile number." ); /* For UK phone functions, do the following server side processing: * Compare original input with this RegEx pattern: @@ -704,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) { phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); return this.optional( element ) || phone_number.length > 9 && phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ ); -}, "Please specify a valid mobile number" ); +}, "Please specify a valid mobile number." ); $.validator.addMethod( "netmask", function( value, element ) { return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value ); @@ -804,13 +1076,71 @@ $.validator.addMethod( "nipPL", function( value ) { return ( intControlNr === parseInt( value[ 9 ], 10 ) ); }, "Please specify a valid NIP number." ); +/** + * Created for project jquery-validation. + * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a + * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers + * that are being used for validation. + * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça + * @author Cleiton da Silva Mendonça + * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça + * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça + */ +$.validator.addMethod( "nisBR", function( value ) { + var number; + var cn; + var sum = 0; + var dv; + var count; + var multiplier; + + // Removing special characters from value + value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" ); + + // Checking value to have 11 digits only + if ( value.length !== 11 ) { + return false; + } + + //Get check number of value + cn = parseInt( value.substring( 10, 11 ), 10 ); + + //Get number with 10 digits of the value + number = parseInt( value.substring( 0, 10 ), 10 ); + + for ( count = 2; count < 12; count++ ) { + multiplier = count; + if ( count === 10 ) { + multiplier = 2; + } + if ( count === 11 ) { + multiplier = 3; + } + sum += ( ( number % 10 ) * multiplier ); + number = parseInt( number / 10, 10 ); + } + dv = ( sum % 11 ); + + if ( dv > 1 ) { + dv = ( 11 - dv ); + } else { + dv = 0; + } + + if ( cn === dv ) { + return true; + } else { + return false; + } +}, "Please specify a valid NIS/PIS number." ); + $.validator.addMethod( "notEqualTo", function( value, element, param ) { return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param ); }, "Please enter a different value, values must not be the same." ); $.validator.addMethod( "nowhitespace", function( value, element ) { return this.optional( element ) || /^\S+$/i.test( value ); -}, "No white space please" ); +}, "No white space please." ); /** * Return true if the field value matches the given format RegExp @@ -842,6 +1172,30 @@ $.validator.addMethod( "phoneNL", function( value, element ) { return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value ); }, "Please specify a valid phone number." ); +/** + * Polish telephone numbers have 9 digits. + * + * Mobile phone numbers starts with following digits: + * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88. + * + * Fixed-line numbers starts with area codes: + * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33, + * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61, + * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84, + * 85, 86, 87, 89, 91, 94, 95. + * + * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39. + * + * Excludes intelligent networks (premium rate, shared cost, free phone numbers). + * + * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en + */ +$.validator.addMethod( "phonePL", function( phone_number, element ) { + phone_number = phone_number.replace( /\s+/g, "" ); + var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/; + return this.optional( element ) || regexp.test( phone_number ); +}, "Please specify a valid phone number." ); + /* For UK phone functions, do the following server side processing: * Compare original input with this RegEx pattern: * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$ @@ -856,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) { phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); return this.optional( element ) || phone_number.length > 9 && phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ ); -}, "Please specify a valid uk phone number" ); +}, "Please specify a valid uk phone number." ); /* For UK phone functions, do the following server side processing: * Compare original input with this RegEx pattern: @@ -870,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) { phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); return this.optional( element ) || phone_number.length > 9 && phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ ); -}, "Please specify a valid phone number" ); +}, "Please specify a valid phone number." ); /** * Matches US phone number format @@ -891,8 +1245,8 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) { $.validator.addMethod( "phoneUS", function( phone_number, element ) { phone_number = phone_number.replace( /\s+/g, "" ); return this.optional( element ) || phone_number.length > 9 && - phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/ ); -}, "Please specify a valid phone number" ); + phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ ); +}, "Please specify a valid phone number." ); /* * Valida CEPs do brasileiros: @@ -921,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) { */ $.validator.addMethod( "postalCodeCA", function( value, element ) { return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value ); -}, "Please specify a valid postal code" ); +}, "Please specify a valid postal code." ); /* Matches Italian postcode (CAP) */ $.validator.addMethod( "postalcodeIT", function( value, element ) { return this.optional( element ) || /^\d{5}$/.test( value ); -}, "Please specify a valid postal code" ); +}, "Please specify a valid postal code." ); $.validator.addMethod( "postalcodeNL", function( value, element ) { return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value ); -}, "Please specify a valid postal code" ); +}, "Please specify a valid postal code." ); // Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK) $.validator.addMethod( "postcodeUK", function( value, element ) { return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value ); -}, "Please specify a valid UK postcode" ); +}, "Please specify a valid UK postcode." ); /* * Lets you say "at least X inputs that match selector Y must be filled." @@ -1072,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) { regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" ); return this.optional( element ) || regex.test( value ); -}, "Please specify a valid state" ); +}, "Please specify a valid state." ); // TODO check if value starts with <, otherwise don't try stripping anything $.validator.addMethod( "strippedminlength", function( value, element, param ) { return $( value ).text().length >= param; -}, $.validator.format( "Please enter at least {0} characters" ) ); +}, $.validator.format( "Please enter at least {0} characters." ) ); $.validator.addMethod( "time", function( value, element ) { return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value ); -}, "Please enter a valid time, between 00:00 and 23:59" ); +}, "Please enter a valid time, between 00:00 and 23:59." ); $.validator.addMethod( "time12h", function( value, element ) { return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value ); -}, "Please enter a valid time in 12-hour am/pm format" ); +}, "Please enter a valid time in 12-hour am/pm format." ); // Same as url, but TLD is optional $.validator.addMethod( "url2", function( value, element ) { - return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value ); + return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value ); }, $.validator.messages.url ); /** @@ -1149,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) { $.validator.addMethod( "zipcodeUS", function( value, element ) { return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value ); -}, "The specified US ZIP Code is invalid" ); +}, "The specified US ZIP Code is invalid." ); $.validator.addMethod( "ziprange", function( value, element ) { return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value ); -}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" ); +}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." ); return $; })); \ No newline at end of file diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js index 6767f24f6b12..80f14b58c2e1 100644 --- a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js +++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js @@ -1,4 +1,4 @@ -/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017 +/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022 * https://jqueryvalidation.org/ - * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */ -!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;e<=9;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;e<=10;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c - - https://github.com/dotnet/runtime - 301ba1ee5d1cfff28a8866924733603f3adf4936 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + e0f0de876a67755a2c6cd2dc730c13f5959bdea8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -246,32 +246,32 @@ 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - https://github.com/dotnet/runtime - 301ba1ee5d1cfff28a8866924733603f3adf4936 + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + e0f0de876a67755a2c6cd2dc730c13f5959bdea8 - https://github.com/dotnet/runtime - 301ba1ee5d1cfff28a8866924733603f3adf4936 + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + e0f0de876a67755a2c6cd2dc730c13f5959bdea8 - https://github.com/dotnet/runtime - 301ba1ee5d1cfff28a8866924733603f3adf4936 + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + e0f0de876a67755a2c6cd2dc730c13f5959bdea8 - https://github.com/dotnet/runtime - 301ba1ee5d1cfff28a8866924733603f3adf4936 + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + e0f0de876a67755a2c6cd2dc730c13f5959bdea8 - https://github.com/dotnet/runtime - 301ba1ee5d1cfff28a8866924733603f3adf4936 + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + e0f0de876a67755a2c6cd2dc730c13f5959bdea8 - - https://github.com/dotnet/runtime - 301ba1ee5d1cfff28a8866924733603f3adf4936 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + e0f0de876a67755a2c6cd2dc730c13f5959bdea8 diff --git a/eng/Versions.props b/eng/Versions.props index 5c43c68802dd..a17f408f20d2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.23 6.0.23 6.0.23 - 6.0.23-servicing.23479.5 + 6.0.23-servicing.23480.2 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.23-servicing.23479.5 + 6.0.23-servicing.23480.2 6.0.1 6.0.0 6.0.2 From f665cb05792a3c832982dfdc06f4b46c33971dbe Mon Sep 17 00:00:00 2001 From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:04:42 -0700 Subject: [PATCH 68/83] Update branding to 6.0.24 (#51115) --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 81189a0e17ed..84aeccf24dce 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,8 +8,8 @@ 6 0 - 23 - true + 24 + false From 1a6ffea33df8ffe36c2720ee42fc091f5576d180 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:18:22 -0700 Subject: [PATCH 69/83] [release/6.0] (deps): Bump src/submodules/googletest (#51049) Bumps [src/submodules/googletest](https://github.com/google/googletest) from `8a6feab` to `e47544a`. - [Release notes](https://github.com/google/googletest/releases) - [Commits](https://github.com/google/googletest/compare/8a6feabf04bec8fb125e0df0ad1195c42350725f...e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b) --- updated-dependencies: - dependency-name: src/submodules/googletest dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/submodules/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/googletest b/src/submodules/googletest index 8a6feabf04be..e47544ad31cb 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit 8a6feabf04bec8fb125e0df0ad1195c42350725f +Subproject commit e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b From 9104f71a6e75915786f8e993fedfb333a8e39970 Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Wed, 4 Oct 2023 13:36:10 -0700 Subject: [PATCH 70/83] Update EventTest.cs (#51142) --- src/Components/test/E2ETest/Tests/EventTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/test/E2ETest/Tests/EventTest.cs b/src/Components/test/E2ETest/Tests/EventTest.cs index 390bdcc09061..18f513720ae2 100644 --- a/src/Components/test/E2ETest/Tests/EventTest.cs +++ b/src/Components/test/E2ETest/Tests/EventTest.cs @@ -173,8 +173,8 @@ public void DragDrop_CanTrigger() var actions = new Actions(Browser).DragAndDrop(input, target); actions.Perform(); - // drop doesn't seem to trigger in Selenium. But it's sufficient to determine "any" drag event works - Browser.Equal("dragstart,", () => output.Text); + // drop doesn't reliably trigger in Selenium. But it's sufficient to determine "any" drag event works + Browser.True(() => output.Text.StartsWith("dragstart,", StringComparison.Ordinal)); } [Fact] From 20f37ce93c870ec529d3370eb1ac8e8e474df15e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 16:54:16 -0700 Subject: [PATCH 71/83] [release/6.0] Dispose CTS in HubConnection streaming (#51139) * Dispose CTS in HubConnection streaming * Apply suggestions from code review Co-authored-by: Stephen Halter --------- Co-authored-by: Brennan Co-authored-by: Stephen Halter --- .../clients/csharp/Client.Core/src/HubConnection.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs index 7e10a4a8da86..9720baff993b 100644 --- a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs +++ b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs @@ -743,7 +743,7 @@ async Task ReadChannelStream() } } - return CommonStreaming(connectionState, streamId, ReadChannelStream); + return CommonStreaming(connectionState, streamId, ReadChannelStream, tokenSource); } // this is called via reflection using the `_sendIAsyncStreamItemsMethod` field @@ -760,11 +760,14 @@ async Task ReadAsyncEnumerableStream() } } - return CommonStreaming(connectionState, streamId, ReadAsyncEnumerableStream); + return CommonStreaming(connectionState, streamId, ReadAsyncEnumerableStream, tokenSource); } - private async Task CommonStreaming(ConnectionState connectionState, string streamId, Func createAndConsumeStream) + private async Task CommonStreaming(ConnectionState connectionState, string streamId, Func createAndConsumeStream, CancellationTokenSource cts) { + // make sure we dispose the CTS created by StreamAsyncCore once streaming completes + using var _ = cts; + Log.StartingStream(_logger, streamId); string? responseError = null; try From 97956e17688a7bc6a2958da867de5e1032e024eb Mon Sep 17 00:00:00 2001 From: wtgodbe Date: Tue, 10 Oct 2023 14:41:57 -0700 Subject: [PATCH 72/83] Update baseline, SDK --- eng/Baseline.Designer.props | 444 ++++++++++++++++++------------------ eng/Baseline.xml | 214 ++++++++--------- eng/Versions.props | 2 +- global.json | 4 +- 4 files changed, 332 insertions(+), 332 deletions(-) diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index 0b962449d9f1..0ca47e957b58 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,28 +2,28 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - - - + + + @@ -34,120 +34,120 @@ - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 @@ -155,114 +155,114 @@ - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - + - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 - + - 6.0.22 + 6.0.23 - - - + + + - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - - + + @@ -270,7 +270,7 @@ - 6.0.22 + 6.0.23 @@ -278,50 +278,50 @@ - 6.0.22 + 6.0.23 - + - + - + - + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - - + + @@ -331,8 +331,8 @@ - - + + @@ -340,8 +340,8 @@ - - + + @@ -352,58 +352,58 @@ - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - + - 6.0.22 + 6.0.23 @@ -411,71 +411,71 @@ - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - + - + - + - + - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 @@ -491,195 +491,195 @@ - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - + - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 - - + + - 6.0.22 + 6.0.23 - + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - + - 6.0.22 + 6.0.23 - - + + - - + + - - + + - 6.0.22 + 6.0.23 - - + + - - + + - - + + - - + + - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - - - - + + + + - 6.0.22 + 6.0.23 @@ -688,69 +688,69 @@ - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - + - 6.0.22 + 6.0.23 - + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 @@ -769,7 +769,7 @@ - 6.0.22 + 6.0.23 @@ -788,7 +788,7 @@ - 6.0.22 + 6.0.23 @@ -804,46 +804,46 @@ - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - - - + + + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 @@ -853,7 +853,7 @@ - 6.0.22 + 6.0.23 @@ -862,73 +862,73 @@ - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - + - + - + - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 @@ -957,11 +957,11 @@ - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 @@ -979,13 +979,13 @@ - 6.0.22 + 6.0.23 - 6.0.22 + 6.0.23 - + \ No newline at end of file diff --git a/eng/Baseline.xml b/eng/Baseline.xml index 2984eef6c6e4..749cc484d04a 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -4,111 +4,111 @@ This file contains a list of all the packages and their versions which were rele Update this list when preparing for a new patch. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eng/Versions.props b/eng/Versions.props index 2635b6b431f9..2186c0e1d1eb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -9,7 +9,7 @@ 6 0 24 - false + true diff --git a/global.json b/global.json index 4cc2acb633b1..83661f95122b 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "6.0.122" + "version": "6.0.123" }, "tools": { - "dotnet": "6.0.122", + "dotnet": "6.0.123", "runtimes": { "dotnet/x64": [ "2.1.30", From 1dac04de588f512c4d88ccc0c1d93ed74e720300 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 18:14:55 +0000 Subject: [PATCH 73/83] Update dependencies from https://github.com/dotnet/arcade build 20231011.8 (#51329) [release/6.0] Update dependencies from dotnet/arcade --- NuGet.config | 12 +++--- eng/Version.Details.xml | 16 ++++---- eng/Versions.props | 4 +- eng/common/retain-build.ps1 | 45 +++++++++++++++++++++ eng/common/templates/steps/retain-build.yml | 28 +++++++++++++ global.json | 4 +- 6 files changed, 91 insertions(+), 18 deletions(-) create mode 100644 eng/common/retain-build.ps1 create mode 100644 eng/common/templates/steps/retain-build.yml diff --git a/NuGet.config b/NuGet.config index d37b12d22a3c..408f809f462b 100644 --- a/NuGet.config +++ b/NuGet.config @@ -5,11 +5,11 @@ + + + - - - @@ -27,11 +27,11 @@ - - - + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 86b6b375a58b..a94b8356c283 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -280,22 +280,22 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8 - + https://github.com/dotnet/arcade - 98fd22588fbb0f407faa6a74cb1aa79031306151 + 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18 - + https://github.com/dotnet/arcade - 98fd22588fbb0f407faa6a74cb1aa79031306151 + 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18 - + https://github.com/dotnet/arcade - 98fd22588fbb0f407faa6a74cb1aa79031306151 + 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18 - + https://github.com/dotnet/arcade - 98fd22588fbb0f407faa6a74cb1aa79031306151 + 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18 diff --git a/eng/Versions.props b/eng/Versions.props index 2186c0e1d1eb..d20d7a658d46 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -131,8 +131,8 @@ 6.0.23 6.0.23 - 6.0.0-beta.23408.5 - 6.0.0-beta.23408.5 + 6.0.0-beta.23511.8 + 6.0.0-beta.23511.8 + + - + @@ -25,9 +27,11 @@ - + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3e5e74df7c07..f4ef4a82883a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 8a56239985565dd10bd1c7a62c848d15d4474f7b + 301a5c190943bb62e8e783a29976059ac2e6ea9c - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 8a56239985565dd10bd1c7a62c848d15d4474f7b + 301a5c190943bb62e8e783a29976059ac2e6ea9c - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 8a56239985565dd10bd1c7a62c848d15d4474f7b + 301a5c190943bb62e8e783a29976059ac2e6ea9c - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 8a56239985565dd10bd1c7a62c848d15d4474f7b + 301a5c190943bb62e8e783a29976059ac2e6ea9c - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 8a56239985565dd10bd1c7a62c848d15d4474f7b + 301a5c190943bb62e8e783a29976059ac2e6ea9c - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 8a56239985565dd10bd1c7a62c848d15d4474f7b + 301a5c190943bb62e8e783a29976059ac2e6ea9c - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 8a56239985565dd10bd1c7a62c848d15d4474f7b + 301a5c190943bb62e8e783a29976059ac2e6ea9c - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 8a56239985565dd10bd1c7a62c848d15d4474f7b + 301a5c190943bb62e8e783a29976059ac2e6ea9c https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 16d5954780b5..f1a18c9e5a91 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -122,14 +122,14 @@ 6.0.11 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 6.0.0-beta.23408.5 6.0.0-beta.23408.5 From 8e60e0f27c8a5c9b9f4ce423cd8d60485f6ed6ae Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 17 Oct 2023 00:00:17 +0000 Subject: [PATCH 75/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 10 ++-------- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 3 files changed, 23 insertions(+), 29 deletions(-) diff --git a/NuGet.config b/NuGet.config index 408f809f462b..8e5616ad2011 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,7 @@ - - - - + @@ -29,10 +26,7 @@ - - - - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a94b8356c283..f6f9e0eeee50 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e0f0de876a67755a2c6cd2dc730c13f5959bdea8 + 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -245,33 +245,33 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e0f0de876a67755a2c6cd2dc730c13f5959bdea8 + 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e0f0de876a67755a2c6cd2dc730c13f5959bdea8 + 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e0f0de876a67755a2c6cd2dc730c13f5959bdea8 + 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e0f0de876a67755a2c6cd2dc730c13f5959bdea8 + 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e0f0de876a67755a2c6cd2dc730c13f5959bdea8 + 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - e0f0de876a67755a2c6cd2dc730c13f5959bdea8 + 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 diff --git a/eng/Versions.props b/eng/Versions.props index d20d7a658d46..96291ad23966 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,12 +63,12 @@ 6.0.0 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23-servicing.23480.2 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24-servicing.23516.12 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.23-servicing.23480.2 + 6.0.24-servicing.23516.12 6.0.1 6.0.0 6.0.2 From 2dc4c74371570fe201a9cc6194b07ec2daabcf86 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 17 Oct 2023 04:38:51 +0000 Subject: [PATCH 76/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 18 +++++++++--------- eng/Versions.props | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/NuGet.config b/NuGet.config index 8e5616ad2011..f159d233fa69 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f6f9e0eeee50..adf69a1fd576 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 + 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 + 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 + 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 + 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 + 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 + 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 9cfaa835e9d761a3433687d004c416e0f2b4f2a6 + 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f diff --git a/eng/Versions.props b/eng/Versions.props index 96291ad23966..83e266fb1fe8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.24 6.0.24 6.0.24 - 6.0.24-servicing.23516.12 + 6.0.24-servicing.23516.20 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.24-servicing.23516.12 + 6.0.24-servicing.23516.20 6.0.1 6.0.0 6.0.2 From caada2338902a9524eb87fdab853eba77db52974 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Tue, 17 Oct 2023 09:52:08 +0000 Subject: [PATCH 77/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 22 +++++++++++----------- eng/Versions.props | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/NuGet.config b/NuGet.config index f159d233fa69..2203d82b14cc 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index adf69a1fd576..57ecbbb3882b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f + cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -233,9 +233,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - c76ac565499f3e7c657126d46c00b67a0d74832c + cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd https://github.com/dotnet/runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f + cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f + cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f + cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f + cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f + cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f + cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd diff --git a/eng/Versions.props b/eng/Versions.props index 83e266fb1fe8..be8559f12092 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.24 6.0.24 6.0.24 - 6.0.24-servicing.23516.20 + 6.0.24-servicing.23516.31 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.24-servicing.23516.20 + 6.0.24-servicing.23516.31 6.0.1 6.0.0 6.0.2 @@ -117,7 +117,7 @@ 6.0.1 6.0.1 6.0.0 - 6.0.8 + 6.0.9 6.0.0 6.0.11 From c81c53cd507ae3699ef60e6a02be0b1984d00452 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 18 Oct 2023 06:06:39 +0000 Subject: [PATCH 78/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/NuGet.config b/NuGet.config index 2203d82b14cc..e703fa482bb4 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 57ecbbb3882b..1f63cdbf5a90 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd + 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -235,7 +235,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd + 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 https://github.com/dotnet/runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd + 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd + 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd + 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd + 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd + 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd + 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 diff --git a/eng/Versions.props b/eng/Versions.props index be8559f12092..4112fa5aa552 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.24 6.0.24 6.0.24 - 6.0.24-servicing.23516.31 + 6.0.24-servicing.23517.17 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.24-servicing.23516.31 + 6.0.24-servicing.23517.17 6.0.1 6.0.0 6.0.2 From 9f5e433f881aea5968fc5a9acb2c5131f3956794 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Thu, 19 Oct 2023 06:42:17 +0000 Subject: [PATCH 79/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 30 +++++++++++++++--------------- eng/Versions.props | 14 +++++++------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/NuGet.config b/NuGet.config index e703fa482bb4..89f9578cdf0b 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1f63cdbf5a90..a4b1d9b13864 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 + d7b9518372d8e9988e62154d73453e7df508df2c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -235,7 +235,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 + d7b9518372d8e9988e62154d73453e7df508df2c https://github.com/dotnet/runtime @@ -245,33 +245,33 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 + d7b9518372d8e9988e62154d73453e7df508df2c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 + d7b9518372d8e9988e62154d73453e7df508df2c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 + d7b9518372d8e9988e62154d73453e7df508df2c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 + d7b9518372d8e9988e62154d73453e7df508df2c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 + d7b9518372d8e9988e62154d73453e7df508df2c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5f9d5a6664bfe9bf832babe09b13a475b9e7f479 + d7b9518372d8e9988e62154d73453e7df508df2c diff --git a/eng/Versions.props b/eng/Versions.props index 4112fa5aa552..999071ab1575 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,12 +63,12 @@ 6.0.0 - 6.0.24 - 6.0.24 - 6.0.24 - 6.0.24 - 6.0.24 - 6.0.24-servicing.23517.17 + 6.0.25 + 6.0.25 + 6.0.25 + 6.0.25 + 6.0.25 + 6.0.25-servicing.23518.22 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.24-servicing.23517.17 + 6.0.25-servicing.23518.22 6.0.1 6.0.0 6.0.2 From d025c79968d63df02830f9b9914707db4d9f02d5 Mon Sep 17 00:00:00 2001 From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com> Date: Thu, 19 Oct 2023 10:33:35 -0700 Subject: [PATCH 80/83] Update branding to 6.0.25 (#51478) --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index d20d7a658d46..89520a167dce 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,8 +8,8 @@ 6 0 - 24 - true + 25 + false From ad15e08a98e1d3697d4577631c6ffc1bfb07e904 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Fri, 20 Oct 2023 04:15:13 +0000 Subject: [PATCH 81/83] [internal/release/6.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/NuGet.config b/NuGet.config index 89f9578cdf0b..8b9bbf7244d2 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a4b1d9b13864..0b56617c933e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -177,9 +177,9 @@ https://github.com/dotnet/runtime 4822e3c3aa77eb82b2fb33c9321f923cf11ddde6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d7b9518372d8e9988e62154d73453e7df508df2c + 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -235,7 +235,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d7b9518372d8e9988e62154d73453e7df508df2c + 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4 https://github.com/dotnet/runtime @@ -247,15 +247,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d7b9518372d8e9988e62154d73453e7df508df2c + 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d7b9518372d8e9988e62154d73453e7df508df2c + 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d7b9518372d8e9988e62154d73453e7df508df2c + 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d7b9518372d8e9988e62154d73453e7df508df2c + 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d7b9518372d8e9988e62154d73453e7df508df2c + 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d7b9518372d8e9988e62154d73453e7df508df2c + 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4 diff --git a/eng/Versions.props b/eng/Versions.props index cc056108ef85..157bc9422314 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 6.0.25 6.0.25 6.0.25 - 6.0.25-servicing.23518.22 + 6.0.25-servicing.23519.12 6.0.0 6.0.1 6.0.0 @@ -103,7 +103,7 @@ 6.0.0 6.0.0 6.0.0 - 6.0.25-servicing.23518.22 + 6.0.25-servicing.23519.12 6.0.1 6.0.0 6.0.2 From b00de4a0a9af86be6fc4891431d5c75cbe81bc37 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Mon, 23 Oct 2023 18:00:36 +0000 Subject: [PATCH 82/83] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-efcore build 20231012.12 dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools From Version 6.0.23 -> To Version 6.0.24 --- NuGet.config | 2 ++ eng/Version.Details.xml | 48 ++++++++++++++++++++--------------------- eng/Versions.props | 16 +++++++------- 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/NuGet.config b/NuGet.config index 8b9bbf7244d2..5b7e24d92a99 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,6 +7,7 @@ + @@ -24,6 +25,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0b56617c933e..14e364efe3cf 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - - https://github.com/dotnet/efcore - 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 301a5c190943bb62e8e783a29976059ac2e6ea9c - - https://github.com/dotnet/efcore - 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 301a5c190943bb62e8e783a29976059ac2e6ea9c - - https://github.com/dotnet/efcore - 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 301a5c190943bb62e8e783a29976059ac2e6ea9c - - https://github.com/dotnet/efcore - 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 301a5c190943bb62e8e783a29976059ac2e6ea9c - - https://github.com/dotnet/efcore - 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 301a5c190943bb62e8e783a29976059ac2e6ea9c - - https://github.com/dotnet/efcore - 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 301a5c190943bb62e8e783a29976059ac2e6ea9c - - https://github.com/dotnet/efcore - 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 301a5c190943bb62e8e783a29976059ac2e6ea9c - - https://github.com/dotnet/efcore - 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1 + + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore + 301a5c190943bb62e8e783a29976059ac2e6ea9c https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 157bc9422314..96593db462a5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -122,14 +122,14 @@ 6.0.11 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 - 6.0.23 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 + 6.0.24 6.0.0-beta.23511.8 6.0.0-beta.23511.8 From 813d42072c04dd128265b4b64800bf7c2b83f07a Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Mon, 23 Oct 2023 19:48:20 +0000 Subject: [PATCH 83/83] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-efcore build 20231023.12 dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools From Version 6.0.24 -> To Version 6.0.25 --- NuGet.config | 4 ++-- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/NuGet.config b/NuGet.config index 5b7e24d92a99..080af6f8c196 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,7 +7,7 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 14e364efe3cf..50a71707b430 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 301a5c190943bb62e8e783a29976059ac2e6ea9c + ebac2284d2825218fa91c188a3f428f244aa6fe3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 301a5c190943bb62e8e783a29976059ac2e6ea9c + ebac2284d2825218fa91c188a3f428f244aa6fe3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 301a5c190943bb62e8e783a29976059ac2e6ea9c + ebac2284d2825218fa91c188a3f428f244aa6fe3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 301a5c190943bb62e8e783a29976059ac2e6ea9c + ebac2284d2825218fa91c188a3f428f244aa6fe3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 301a5c190943bb62e8e783a29976059ac2e6ea9c + ebac2284d2825218fa91c188a3f428f244aa6fe3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 301a5c190943bb62e8e783a29976059ac2e6ea9c + ebac2284d2825218fa91c188a3f428f244aa6fe3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 301a5c190943bb62e8e783a29976059ac2e6ea9c + ebac2284d2825218fa91c188a3f428f244aa6fe3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 301a5c190943bb62e8e783a29976059ac2e6ea9c + ebac2284d2825218fa91c188a3f428f244aa6fe3 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 96593db462a5..b5bf1899ea21 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -122,14 +122,14 @@ 6.0.11 - 6.0.24 - 6.0.24 - 6.0.24 - 6.0.24 - 6.0.24 - 6.0.24 - 6.0.24 - 6.0.24 + 6.0.25 + 6.0.25 + 6.0.25 + 6.0.25 + 6.0.25 + 6.0.25 + 6.0.25 + 6.0.25 6.0.0-beta.23511.8 6.0.0-beta.23511.8