Skip to content

api sort - #2959

Merged
fengzeroz merged 1 commit into
emqx:v2.16from
fengzeroz:v2.16
Nov 12, 2026
Merged

fengzeroz merged 1 commit into
emqx:v2.16from
fengzeroz:v2.16

Conversation

@fengzeroz

Copy link
Copy Markdown
Member

No description provided.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T07:28:34.368498Z 0d73014 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov-commenter

codecov-commenter commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.60305% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.04%. Comparing base (96efee0) to head (b66b762).
⚠️ Report is 2 commits behind head on v2.16.

Files with missing lines Patch % Lines
plugins/restful/datatag_handle.c 35.71% 9 Missing ⚠️
src/adapter/driver/driver.c 66.66% 1 Missing ⚠️
src/parser/neu_json_rw.c 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            v2.16    #2959      +/-   ##
==========================================
+ Coverage   68.95%   69.04%   +0.08%     
==========================================
  Files         137      137              
  Lines       34671    34799     +128     
==========================================
+ Hits        23909    24026     +117     
- Misses      10762    10773      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fengzeroz
fengzeroz merged commit 64119b3 into emqx:v2.16 Nov 12, 2026
14 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d73014fe1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +553 to +557
neu_http_get_param_str(aio, "sort_by", sort_by, sizeof(sort_by));
if (sort_len != -2) {
neu_tag_cmp_fn cmp =
sort_len >= 0 && (size_t) sort_len < sizeof(sort_by)
? neu_tag_get_sort_cmp(sort_by)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the ascending sign when parsing GET sorts

When a caller uses the accepted ascending spelling directly in the GET URL, for example ?sort_by=+name, neu_http_get_param_str passes it through neu_url_decode, which rewrites the literal + to a space (src/utils/http.c:75-76); neu_tag_get_sort_cmp then receives " name" and this path returns NEU_ERR_PARAM_IS_WRONG. Thus ascending GET sorting only works if clients happen to percent-encode the sign as %2B, while the equivalent JSON API accepts +name as-is; preserve or normalize the leading sign before validating this parameter.

Useful? React with 👍 / 👎.

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