Skip to content

AntPathMatcher regression in 4.3 RC1 [SPR-14141] #18713

@spring-projects-issues

Description

@spring-projects-issues

Stephan Schroevers opened SPR-14141 and commented

The following test passes with version 4.2.5.RELEASE but fails with 4.3.0.RC1:

@Test
public void testPathMatcher() {
	PathMatcher matcher = new AntPathMatcher();
	assertTrue(matcher.match("https://example.com", "https://example.com"));
}

Cursory debugging indicates that the double slashes are problematic. The following test passes with both versions:

@Test
public void testPathMatcher() {
	PathMatcher matcher = new AntPathMatcher();
	assertTrue(matcher.match("https:/**/example.com", "https://example.com"));
}

This regression seems relevant because double slashes are common in patterns provided to the following methods:

  • MockMvcResultMatchers#forwardedUrlPattern
  • MockMvcResultMatchers#redirectedUrlPattern

I suspect this is related to #18487.


Affects: 4.3 RC1

Issue Links:

Referenced from: commits 368f29d

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions