Skip to content

Commit 20922c4

Browse files
authored
Merge pull request #138 from xdev-software/develop
Release
2 parents d775ab5 + b59daa1 commit 20922c4

File tree

7 files changed

+33
-46
lines changed

7 files changed

+33
-46
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ body:
3333
validations:
3434
required: true
3535

36+
- type: textarea
37+
id: description
38+
attributes:
39+
label: Description of the problem
40+
description: |
41+
Describe as exactly as possible what is not working.
42+
validations:
43+
required: true
44+
3645
- type: textarea
3746
id: steps-to-reproduce
3847
attributes:
@@ -47,20 +56,6 @@ body:
4756
validations:
4857
required: true
4958

50-
- type: textarea
51-
id: expected-behavior
52-
attributes:
53-
label: Expected behavior
54-
description: |
55-
Tell us what you expect to happen.
56-
57-
- type: textarea
58-
id: actual-behavior
59-
attributes:
60-
label: Actual behavior
61-
description: |
62-
Tell us what happens with the steps given above.
63-
6459
- type: textarea
6560
id: additional-information
6661
attributes:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 2.1.0
2+
* Updated to Spring Security 6.5+ / Spring Boot 3.5+
3+
* [``Extendable``] Backported some minor upstream changes
4+
15
# 2.0.1
26
* Migrated deployment to _Sonatype Maven Central Portal_ [#155](https://github.com/xdev-software/standard-maven-template/issues/155)
37
* Updated dependencies

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.xdev</groupId>
88
<artifactId>spring-security-advanced-authentication-ui-root</artifactId>
9-
<version>2.0.2-SNAPSHOT</version>
9+
<version>2.1.0-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<organization>
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>com.puppycrawl.tools</groupId>
4747
<artifactId>checkstyle</artifactId>
48-
<version>10.23.1</version>
48+
<version>10.24.0</version>
4949
</dependency>
5050
</dependencies>
5151
<configuration>

spring-security-advanced-authentication-ui-demo/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<parent>
88
<groupId>software.xdev</groupId>
99
<artifactId>spring-security-advanced-authentication-ui-root</artifactId>
10-
<version>2.0.2-SNAPSHOT</version>
10+
<version>2.1.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>spring-security-advanced-authentication-ui-demo</artifactId>
14-
<version>2.0.2-SNAPSHOT</version>
14+
<version>2.1.0-SNAPSHOT</version>
1515
<packaging>jar</packaging>
1616

1717
<organization>
@@ -28,7 +28,7 @@
2828

2929
<mainClass>software.xdev.Application</mainClass>
3030

31-
<org.springframework.boot.version>3.4.5</org.springframework.boot.version>
31+
<org.springframework.boot.version>3.5.0</org.springframework.boot.version>
3232
</properties>
3333

3434
<dependencyManagement>

spring-security-advanced-authentication-ui/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.xdev</groupId>
88
<artifactId>spring-security-advanced-authentication-ui</artifactId>
9-
<version>2.0.2-SNAPSHOT</version>
9+
<version>2.1.0-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

1212
<name>spring-security-advanced-authentication-ui</name>
@@ -53,13 +53,13 @@
5353
<dependency>
5454
<groupId>org.springframework.boot</groupId>
5555
<artifactId>spring-boot-starter-web</artifactId>
56-
<version>3.4.5</version>
56+
<version>3.5.0</version>
5757
<scope>provided</scope>
5858
</dependency>
5959
<dependency>
6060
<groupId>org.springframework.boot</groupId>
6161
<artifactId>spring-boot-starter-security</artifactId>
62-
<version>3.4.5</version>
62+
<version>3.5.0</version>
6363
<scope>provided</scope>
6464
</dependency>
6565

@@ -237,7 +237,7 @@
237237
<dependency>
238238
<groupId>com.puppycrawl.tools</groupId>
239239
<artifactId>checkstyle</artifactId>
240-
<version>10.23.1</version>
240+
<version>10.24.0</version>
241241
</dependency>
242242
</dependencies>
243243
<configuration>

spring-security-advanced-authentication-ui/src/main/java/software/xdev/spring/security/web/authentication/ui/extendable/filters/ExtendableDefaultLoginPageGeneratingFilter.java

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,9 @@
2929
import jakarta.servlet.ServletResponse;
3030
import jakarta.servlet.http.HttpServletRequest;
3131
import jakarta.servlet.http.HttpServletResponse;
32-
import jakarta.servlet.http.HttpSession;
3332

34-
import org.springframework.security.core.AuthenticationException;
35-
import org.springframework.security.web.WebAttributes;
3633
import org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter;
3734
import org.springframework.util.Assert;
38-
import org.springframework.util.StringUtils;
3935

4036
// CPD-OFF - Upstream copy
4137

@@ -369,8 +365,11 @@ protected String renderHeaders(final HttpServletRequest request)
369365
}
370366

371367
protected String renderFormLogin(
372-
final HttpServletRequest request, final boolean loginError, final boolean logoutSuccess,
373-
final String contextPath, final String errorMsg)
368+
final HttpServletRequest request,
369+
final boolean loginError,
370+
final boolean logoutSuccess,
371+
final String contextPath,
372+
final String errorMsg)
374373
{
375374
if(!this.formLoginEnabled)
376375
{
@@ -485,21 +484,9 @@ protected static String renderSaml2Row(final String contextPath, final String ur
485484

486485
protected String getLoginErrorMessage(final HttpServletRequest request)
487486
{
488-
final HttpSession session = request.getSession(false);
489-
if(session == null)
490-
{
491-
return "Invalid credentials";
492-
}
493-
if(!(session.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION)
494-
instanceof final AuthenticationException exception))
495-
{
496-
return "Invalid credentials";
497-
}
498-
if(!StringUtils.hasText(exception.getMessage()))
499-
{
500-
return "Invalid credentials";
501-
}
502-
return exception.getMessage();
487+
// Was changed in Spring Boot 3.5 to always return the same message
488+
// https://github.com/spring-projects/spring-security/commit/c4b223266c7c4713823634326705b586b47a58c4
489+
return "Invalid credentials";
503490
}
504491

505492
protected String renderHiddenInput(final String name, final String value)

spring-security-advanced-authentication-ui/src/main/java/software/xdev/spring/security/web/authentication/ui/extendable/filters/ExtendableDefaultLogoutPageGeneratingFilter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
import jakarta.servlet.http.HttpServletResponse;
2828

2929
import org.springframework.core.log.LogMessage;
30+
import org.springframework.http.HttpMethod;
3031
import org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter;
31-
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
32+
import org.springframework.security.web.servlet.util.matcher.PathPatternRequestMatcher;
3233
import org.springframework.security.web.util.matcher.RequestMatcher;
3334
import org.springframework.util.Assert;
3435

@@ -41,7 +42,7 @@ public class ExtendableDefaultLogoutPageGeneratingFilter
4142
extends DefaultLogoutPageGeneratingFilter
4243
implements GeneratingFilterFillDataFrom<DefaultLogoutPageGeneratingFilter>, ExtendableDefaultPageGeneratingFilter
4344
{
44-
protected RequestMatcher matcher = new AntPathRequestMatcher("/logout", "GET");
45+
protected RequestMatcher matcher = PathPatternRequestMatcher.withDefaults().matcher(HttpMethod.GET, "/logout");
4546

4647
protected Function<HttpServletRequest, Map<String, String>> resolveHiddenInputs =
4748
request -> Collections.emptyMap();

0 commit comments

Comments
 (0)