Painless should reject assignment to special getter variables #117929
Labels
:Core/Infra/Scripting
Scripting abstractions, Painless, and Mustache
Team:Core/Infra
Meta label for core/infra team
Painless adds additional variables into scripts based on getter present in the script context. For example, in IngestScript the
getCtx()
method provides for thectx
variable. Although the variable is backed by a getter and so there is clearly no assignment possible, painless does not reject overwriting the localctx
variable. To a user it appears assignment to ctx works, but in practice the change is a noop. We should block such assignment with a clear error message.The text was updated successfully, but these errors were encountered: