Skip to content

Painless should reject assignment to special getter variables #117929

Open
@rjernst

Description

@rjernst

Painless adds additional variables into scripts based on getter present in the script context. For example, in IngestScript the getCtx() method provides for the ctx variable. Although the variable is backed by a getter and so there is clearly no assignment possible, painless does not reject overwriting the local ctx 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Core/Infra/ScriptingScripting abstractions, Painless, and MustacheTeam:Core/InfraMeta label for core/infra team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions