From e2f6ad6169e229c60cd8d3b6221bb43f66bcabea Mon Sep 17 00:00:00 2001 From: Muqeet Khan Date: Wed, 22 Nov 2017 13:04:54 -0600 Subject: [PATCH] Updated logging extension to remove the period on ValidationFailed _tokenValidationFailed format string includes the JWT token followed by a period, which if a dev troubleshooting copies incorrectly to the EOL will make the JWT invalid. Current: Failed to validate the token eyJhbGc.......HCwFmw. Proposed: Failed to validate the token eyJhbGc.......HCwFmw --- .../LoggingExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Authentication.JwtBearer/LoggingExtensions.cs b/src/Microsoft.AspNetCore.Authentication.JwtBearer/LoggingExtensions.cs index 008190f516e5..38a75fecafdf 100644 --- a/src/Microsoft.AspNetCore.Authentication.JwtBearer/LoggingExtensions.cs +++ b/src/Microsoft.AspNetCore.Authentication.JwtBearer/LoggingExtensions.cs @@ -16,7 +16,7 @@ static LoggingExtensions() _tokenValidationFailed = LoggerMessage.Define( eventId: 1, logLevel: LogLevel.Information, - formatString: "Failed to validate the token {Token}."); + formatString: "Failed to validate the token {Token}"); _tokenValidationSucceeded = LoggerMessage.Define( eventId: 2, logLevel: LogLevel.Information,