Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about unsupported "/path/**/other" patterns with WebFlux PathPatternParser #24958

Closed
bclozel opened this issue Apr 22, 2020 · 0 comments
Closed
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Apr 22, 2020

This issue is an early warning of behavior changes coming with #24952 in 5.3.0.

When applications use PathPatternParser to parse patterns with "**" in the middle, we should log a WARNING log message about this particular pattern saying that it will be processed as a "*" and rejected in the future.

We should also improve the Javadoc and reference documentation to better explain the cases supported here.

@bclozel bclozel added the type: enhancement A general enhancement label Apr 22, 2020
@bclozel bclozel added this to the 5.2.6 milestone Apr 22, 2020
@bclozel bclozel self-assigned this Apr 22, 2020
bclozel added a commit that referenced this issue May 11, 2020
Prior to this commit, patterns like `"/path/**/other"` would be treated
as `"/path/*/other"` (single wildcard, i.e. matching zero to many chars
within a path segment). This will not match multiple segments, as
expected by `AntPathMatcher` users or by `PathPatternParser` users when
in patterns like `"/resource/**"`.

This commit now rejects patterns like `"/path/**/other"` as invalid.
This behavior was previously warned against since gh-24958.

Closes gh-24952
kenny5he pushed a commit to kenny5he/spring-framework that referenced this issue Jun 21, 2020
Prior to this commit, patterns like `"/path/**/other"` would be treated
as `"/path/*/other"` (single wildcard, i.e. matching zero to many chars
within a path segment). This will not match multiple segments, as
expected by `AntPathMatcher` users or by `PathPatternParser` users when
in patterns like `"/resource/**"`.

This commit now rejects patterns like `"/path/**/other"` as invalid.
This behavior was previously warned against since spring-projectsgh-24958.

Closes spring-projectsgh-24952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant