Skip to content

fix(acme): wrap order list response in {"orders": [...]} per RFC 8555#2643

Open
Yanhu007 wants to merge 1 commit intosmallstep:masterfrom
Yanhu007:fix/acme-orders-list-response
Open

fix(acme): wrap order list response in {"orders": [...]} per RFC 8555#2643
Yanhu007 wants to merge 1 commit intosmallstep:masterfrom
Yanhu007:fix/acme-orders-list-response

Conversation

@Yanhu007
Copy link
Copy Markdown

Fixes #2629

Problem

GetOrdersByAccountID returns a bare JSON array:

[]

RFC 8555 §7.1.2.1 requires:

{"orders": []}

Fix

Wrap the response in a struct with an "orders" field. Guard against nil slices to ensure empty responses are {"orders":[]} not {"orders":null}.

Tests updated and passing.

GetOrdersByAccountID returns a bare JSON array [] instead of the
RFC 8555 §7.1.2.1 required format {"orders": [...]}.

Wrap the response in a struct with an "orders" field. Also guard
against nil slices to ensure empty responses are {"orders":[]}
rather than {"orders":null}.

Fixes smallstep#2629
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions Bot added the needs triage Waiting for discussion / prioritization by team label Apr 12, 2026
@hslatman hslatman added this to the v0.30.3 milestone Apr 14, 2026
@hslatman
Copy link
Copy Markdown
Member

Hey @Yanhu007, thank you for submitting the PR 🙂

Could you have a look at the CLA? Without approval we can't merge your contribution.

@hslatman hslatman self-requested a review April 14, 2026 11:34
@hslatman hslatman self-assigned this Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs triage Waiting for discussion / prioritization by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Step CA 0.30.2 send malformed JSON reply for order list

4 participants