Skip to content

PUT _ingest/pipeline allows creating a pipeline with special characters in its name #104411

@joegallo

Description

@joegallo

We should tighten up the validation on this:

PUT _ingest/pipeline/pipeline-1,lol* { "description": "pipeline 1 lol all star", "processors": [ { "set": { "field": "foo.bar", "value": "4", "override": false } } ] } 

GET with a star works as a way of fetching such a pipeline -- you can't get it by id because commas and stars are meta characters for the GET API. GET _ingest/pipeline/pipeline* results in:

{ "pipeline-1,lol*" : { "description" : "pipeline 1 lol all star", "processors" : [ { "set" : { "field" : "foo.bar", "value" : "4", "override" : false } } ] } } 

The pipeline itself actually works fine for ingesting documents, though, at least as far as I can tell:

POST my-index/_bulk?pipeline=pipeline-1,lol* {"index": {"_id": "1"}} {"hello": "world"} 

GET my-index/_doc/1 gives the following, so it seems like the pipeline worked fine:

{ "_index" : "my-index", "_id" : "1", "_version" : 1, "_seq_no" : 0, "_primary_term" : 1, "found" : true, "_source" : { "hello" : "world", "foo" : { "bar" : "4" } } } 

Since technically this all works fine today, I think one could very reasonably argue that fixing this bug is a breaking change.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions