Add default validation for $namespace, $controller, and $action url mapping variables#15525
Merged
codeconsole merged 14 commits intoapache:7.1.xfrom Mar 29, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
sbglasius
approved these changes
Mar 24, 2026
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
matrei
approved these changes
Mar 28, 2026
Contributor
Author
|
I am doing some final testing and want to do 1 more doc update before merging |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
|
@codeconsole There is an existing config setting with the config key: grails:
urlmapping:
cache:
maxsize: 1000Should we use that namespace instead for validateWildcards? grails:
urlmapping:
validateWildcards: false
cache:
maxsize: 1000 |
✅ All tests passed ✅Test Summary
🏷️ Commit: 04904da Learn more about TestLens at testlens.app. |
Contributor
Author
@matrei |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Validates namespace, controller and action. If validation fails, triggers next mapping.
Literals override wildcards.
Without validation, you have to a do something messy like this:
I can't think why you would want to disable this feature, but it can be disabled via:
Does not affect performance:
Steps 1 and 2 were already happening before this change. The only new cost is step 3, which is negligible.