Skip to content

RestGetIndicesAction matches REST queries that start with _ even when no indicies can ever match that #107425

@thecoop

Description

@thecoop

This came out as an issue due to #106820

All REST API calls that start with _ match RestGetIndicesAction due to the generic catch-all route /{index}, even though no index can ever start with _. This messes up capability checks on invalid APIs, returning true (as it matched a handler) even though that can't ever work. This also causes some odd behaviour with other APIs, with POST /_typo returning 405 rather than 404, as it matches /{index} even though it could never work.

We should limit wildcards to not match _. There are various levels we could do this at.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions