From 33495441b56ec6ce9e85b5e824460b2b4984f7e6 Mon Sep 17 00:00:00 2001 From: Daniel Garnier-Moiroux Date: Thu, 5 Sep 2024 14:07:55 +0200 Subject: [PATCH] Hardcode ott-username input name in DefaultLoginPageGeneratingFilter - GenerateOneTimeTokenFilter uses `"username"`, the default UI should use the same parameter name --- .../authentication/ui/DefaultLoginPageGeneratingFilter.java | 4 ++-- .../authentication/DefaultLoginPageGeneratingFilterTests.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java b/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java index efdc73e9a6..042fc41d26 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java +++ b/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java @@ -242,8 +242,8 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean { sb.append("

Request a One-Time Token

\n"); sb.append(createError(loginError, errorMsg) + createLogoutSuccess(logoutSuccess) + "

\n"); sb.append(" \n"); - sb.append(" \n"); + sb.append( + " \n"); sb.append("

\n"); sb.append(renderHiddenInputs(request)); sb.append(" \n"); diff --git a/web/src/test/java/org/springframework/security/web/authentication/DefaultLoginPageGeneratingFilterTests.java b/web/src/test/java/org/springframework/security/web/authentication/DefaultLoginPageGeneratingFilterTests.java index c1fe329f05..9527709878 100644 --- a/web/src/test/java/org/springframework/security/web/authentication/DefaultLoginPageGeneratingFilterTests.java +++ b/web/src/test/java/org/springframework/security/web/authentication/DefaultLoginPageGeneratingFilterTests.java @@ -199,7 +199,7 @@ public class DefaultLoginPageGeneratingFilterTests {

Request a One-Time Token

- +