diff --git a/Udap.Server/Security/Authentication/TieredOAuth/TieredOAuthAuthenticationHandler.cs b/Udap.Server/Security/Authentication/TieredOAuth/TieredOAuthAuthenticationHandler.cs index c0467771..96f43061 100644 --- a/Udap.Server/Security/Authentication/TieredOAuth/TieredOAuthAuthenticationHandler.cs +++ b/Udap.Server/Security/Authentication/TieredOAuth/TieredOAuthAuthenticationHandler.cs @@ -405,7 +405,8 @@ protected override async Task ExchangeCodeAsync(OAuthCodeExc { Logger.LogInformation("UDAP exchanging authorization code."); Logger.LogDebug("{ReturnUrl}", context.Properties.Items["returnUrl"] ?? "~/"); - Logger.LogDebug("{QueryString}", Context.Request.QueryString.Value); + var sanitizedQueryString = Context.Request.QueryString.Value?.Replace(Environment.NewLine, "").Replace("\n", "").Replace("\r", ""); + Logger.LogDebug("{QueryString}", sanitizedQueryString); var originalRequestParams = HttpUtility.ParseQueryString(context.Properties.Items["returnUrl"] ?? "~/"); var idp = (originalRequestParams.GetValues("idp") ?? throw new InvalidOperationException()).Last();