feat(ansible): Configure les variables d'environnement pour Stripe et Mailer.

🐛 fix(Security): Supprime le code de redirection vers la cible originale.
This commit is contained in:
Serreau Jovann
2025-11-22 22:07:04 +01:00
parent 9ee52c36a4
commit 45860d1157
2 changed files with 2 additions and 8 deletions

View File

@@ -70,7 +70,7 @@
REAL_MAIL=1
VAULT_ADDR=http://127.0.0.1:8200
VAULT_TOKEN=hvs.QLpUdiptXtSPo5Qf7i2nn2Xz
STRIPE_PK=pk_live_51SUA1rP4ub49xK2ThoRH8efqGYNi1hrcWMzrqmDtJpMv12cmTzLa8ncJLUKLbOQNZTkm1jgptLfwt4hxEGqkVsHB00AK3ieZNl
STRIPE_PK=pk_live_51SUA1rP4ub49xK2ThoRH8efqGYNi1hrcWMzrqmDtJpMv12cmTzLa8ncJLUKLbOQNZTkm1jgptLfwt4hxEGqkVsHB00AK3ieZNl
STRIPE_SK=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
STRIPE_WEBHOOKS_SIGN=whsec_wNHtgjypqbfP7erAqifCOzZvW8kW9oB7
MAILER_DSN=ses+smtp://AKIAWTT2T22CWBRBBDYN:BBdgb6KxRQ8mNcpWFJsZCJxbSGNdgLhKFiITMErfBlQP@default?region=eu-west-3

View File

@@ -66,7 +66,7 @@ class LoginFormAuthenticator extends AbstractLoginFormAuthenticator
return $user;
}),
// 2. Credentials: Vérifie le mot de passe
// 2. Credentials: Vérifie le mot de passe
new PasswordCredentials($request->request->get('_password', '')),
[
// 3. CsrfTokenBadge: Vérifie le jeton CSRF (l'ID 'authenticate' doit correspondre au Twig)
@@ -86,12 +86,6 @@ class LoginFormAuthenticator extends AbstractLoginFormAuthenticator
*/
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response
{
// 1. Redirige vers la cible originale si elle existe (avant la page de login)
if ($targetPath = $this->getTargetPath($request->getSession(), $firewallName)) {
return new RedirectResponse($targetPath);
}
// 2. Redirection par défaut (par exemple, vers le tableau de bord)
return new RedirectResponse($this->urlGenerator->generate('app_home'));
}