fix: escape data for state
All checks were successful
.NET Test Pipeline / build-and-test (push) Successful in 1m38s
Build and Deploy Docker Container / build-and-deploy (push) Successful in 2m9s

This commit is contained in:
Polianin Nikita 2024-12-23 08:10:19 +03:00
parent 5ff8744a55
commit d505041c72
2 changed files with 4 additions and 4 deletions

View File

@ -5,9 +5,9 @@
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<Company>Winsomnia</Company>
<Version>1.1.1</Version>
<AssemblyVersion>1.1.3.1</AssemblyVersion>
<FileVersion>1.1.3.1</FileVersion>
<Version>1.1.3</Version>
<AssemblyVersion>1.1.3.3</AssemblyVersion>
<FileVersion>1.1.3.3</FileVersion>
<AssemblyName>Mirea.Api.Security</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace>
<OutputType>Library</OutputType>

View File

@ -117,7 +117,7 @@ public class OAuthService(ILogger<OAuthService> logger, Dictionary<OAuthProvider
"&response_type=code" +
$"&redirect_uri={redirectUri}" +
$"&scope={ProviderData[provider].Scope}" +
$"&state={state}_{Enum.GetName(provider)}";
$"&state={Uri.EscapeDataString(state + "_" + Enum.GetName(provider))}";
logger.LogInformation("Redirecting user Fingerprint: {Fingerprint} to OAuth provider {Provider} with state: {State}",
requestInfo.Fingerprint,