Skip to content

Stored scripts API accepting malformed requests #27612

Closed
@clintongormley

Description

@clintongormley

The stored scripts API today accepts malformed requests instead of throwing an exception. For instance:

POST _scripts/foo
{
  "source": "return"
}

GET _scripts/foo

returns

{
  "_id": "foo",
  "found": true,
  "script": {
    "lang": "mustache",
    "source": """{"source":"return"}"""
  }
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions