From 04a708216a8a1fe7df078c56a2a82620e938371f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szak=C3=A1ts=20Alp=C3=A1r=20Zsolt?= Date: Sun, 17 Aug 2025 12:11:27 +0200 Subject: [PATCH] Uses local redirect for authorization. Changes from `RedirectToRoute` to `LocalRedirect` for the authorization endpoint to improve security and ensure the redirect stays within the application's domain. --- Source/ProofOfConcept/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ProofOfConcept/Program.cs b/Source/ProofOfConcept/Program.cs index 4f12062..42071b2 100644 --- a/Source/ProofOfConcept/Program.cs +++ b/Source/ProofOfConcept/Program.cs @@ -238,7 +238,7 @@ if (app.Environment.IsDevelopment()) logger.LogCritical("User has access_token: {access_token} and refresh_token: {refresh_token}", access_token, refresh_token); if (String.IsNullOrEmpty(access_token)) - return Results.RedirectToRoute("/Authorize"); + return Results.LocalRedirect("/Authorize"); HttpClient client = httpClientFactory.CreateClient(); client.BaseAddress = new Uri("tesla_command_proxy");