-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Increase max regex length in SpEL expressions #30265
Copy link
Copy link
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regressionA bug that is also a regression
Milestone
Description
In version 6.0.7 of spring-expression there was a method added called checkRegexLength:
Lines 120 to 125 in 69c8f8e
| private void checkRegexLength(String regex) { | |
| if (regex.length() > MAX_REGEX_LENGTH) { | |
| throw new SpelEvaluationException(getStartPosition(), | |
| SpelMessage.MAX_REGEX_LENGTH_EXCEEDED, MAX_REGEX_LENGTH); | |
| } | |
| } |
It is adding a 256 char limit check on a length of a regex in a SpEL expression. We actually use longer regexes. Why would you put this limit? Seems quite random.
Please remove this check or at least make that max regex length value configurable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regressionA bug that is also a regression