Skip to content

fix: reject unknown indexes in HTTP queries - #173

Open
immanuwell wants to merge 1 commit into
cilium:mainfrom
immanuwell:fix/http-query-unknown-index
Open

fix: reject unknown indexes in HTTP queries#173
immanuwell wants to merge 1 commit into
cilium:mainfrom
immanuwell:fix/http-query-unknown-index

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

Unknown index names make /query panic and close the connection. Kinda rough.

Return 400 Bad Request with a JSON error instead. Primary and ByRevision queries still work.

Repro: send GET /query with {"key":"","table":"test","index":"unknown"}. Before, it panics and the client gets EOF. Now it returns 400.

@immanuwell
immanuwell requested a review from a team as a code owner July 14, 2026 09:48
@immanuwell
immanuwell requested review from derailed and removed request for a team July 14, 2026 09:48

@derailed derailed left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@immanuwell Nice catch!

Comment thread http_test.go Outdated
@immanuwell
immanuwell force-pushed the fix/http-query-unknown-index branch from 3af7e61 to 97e4da6 Compare July 15, 2026 07:06
@immanuwell
immanuwell requested a review from derailed July 15, 2026 07:21

@derailed derailed left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@immanuwell See comment below.

Signed-off-by: immanuwell <pchpr.00@list.ru>
@immanuwell
immanuwell force-pushed the fix/http-query-unknown-index branch from 97e4da6 to 34ed7aa Compare July 17, 2026 09:08
@immanuwell

Copy link
Copy Markdown
Contributor Author

@derailed addressed your suggestions, PTAL

@immanuwell
immanuwell requested a review from derailed July 17, 2026 09:11
@derailed
derailed requested review from joamaki and tklauser July 17, 2026 19:13

@derailed derailed left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@immanuwell Thank you for the updates. LGTM. Added Jussi/Tobias for their review.

@immanuwell

Copy link
Copy Markdown
Contributor Author

@tklauser @joamaki WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants