Skip to content

Stop domain commands from printing payment method ids - #18

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/fix-leak-check-payment-method-377c
Dec 4, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
cursor/fix-leak-check-payment-method-377c

Conversation

@shaygun

@shaygun shaygun commented Dec 4, 2026

Copy link
Copy Markdown
Member

Summary

main is red on leak-check after #17. The check matches paymentMethodId in the generated registrar client. Every hit is a property name with no card id:

  • request bodies for price, checkout, and auto-renew (--card)
  • the v1DomainOrder response field the CLI reads so checkout charges the card the quote was priced for

Those names are required. The check is unchanged for every other hit: a value on the same line, an example, a comment, renewalPaymentMethodId, or payment_method still fails. There is no blanket allowlist.

The real leak was in command output. nr domain … --output json and nr domain order --output json marshaled the whole order, including the card id the API returned. Text output did not print it, and nothing was written to config. JSON output now drops that field before printing. Checkout still sends the id to the API and does not echo it.

Testing

  • go test -race -count=1 ./...
  • go vet ./...
  • ./scripts/openapi-leak-check.sh
Open in Web Open in Cursor 

leak-check flagged paymentMethodId because the generated registrar client
names that field. Those hits are property names with no card id. The check
still fails on a value, an example, or any other payment-method spelling.

Domain order JSON included the id the quote selected. Strip it before
printing. Text output never showed it, and checkout still sends it to the API.

Co-authored-by: Shayguun <shaygun@users.noreply.github.com>
@cursor
cursor Bot merged commit acae8a4 into main Dec 4, 2026
3 checks passed
@shaygun shaygun mentioned this pull request Dec 4, 2026
shaygun added a commit that referenced this pull request Dec 4, 2026
* Revert "Keep payment method ids out of domain command output. (#18)"

This reverts commit acae8a4.

* Revert "Add nr domain commands for NodeRings domain registration. (#17)"

This reverts commit 396e2ae.
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