-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Limit SpEL expression length #30325
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Comments
bclozel
added
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
labels
Apr 13, 2023
github-actions
bot
added
status: backported
An issue that has been backported to maintenance branches
and removed
for: backport-to-5.3.x
status: backported
An issue that has been backported to maintenance branches
labels
Apr 13, 2023
github-actions
bot
added
the
status: backported
An issue that has been backported to maintenance branches
label
Apr 13, 2023
sbrannen
added a commit
to sbrannen/spring-framework
that referenced
this issue
Apr 25, 2023
Prior to spring-projectsgh-30325, supplying a null reference for a SpEL expression was effectively equivalent to supplying the String "null" as the expression. Consequently, evaluation of a null reference expression always evaluated to a null reference. However, that was accidental rather than by design. Due to the introduction of the checkExpressionLength(String) method in InternalSpelExpressionParser (in conjunction with spring-projectsgh-30325), an attempt to evaluate a null reference as a SpEL expression now results in a NullPointerException. To address both of these issues, TemplateAwareExpressionParser.parseExpression() and SpelExpressionParser.parseRaw() now reject null and empty SpEL expressions. Closes spring-projectsgh-30371
sbrannen
added a commit
that referenced
this issue
Apr 25, 2023
Prior to gh-30325, supplying a null reference for a SpEL expression was effectively equivalent to supplying the String "null" as the expression. Consequently, evaluation of a null reference expression always evaluated to a null reference. However, that was accidental rather than by design. Due to the introduction of the checkExpressionLength(String) method in InternalSpelExpressionParser (in conjunction with gh-30325), an attempt to evaluate a null reference as a SpEL expression now results in a NullPointerException. To address both of these issues, TemplateAwareExpressionParser.parseExpression() and SpelExpressionParser.parseRaw() now reject null and empty SpEL expressions. See gh-30371 Closes gh-30373
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
We should apply a limit to how large a SpEL expression can be.
The text was updated successfully, but these errors were encountered: