Skip to content

fix(transactions): mask a server-issued intent ID in logs until it settles - #1131

Merged
bmc08gt merged 1 commit into
mainfrom
fix/payment-intent-id-logging
Oct 25, 2026
Merged

bmc08gt merged 1 commit into
mainfrom
fix/payment-intent-id-logging

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

A payment request's payment_intent_id can be used up by anyone who learns it before the share is paid (paymentrequest_service.proto:192), which blocks the real payment. TransactionService.submit logged every intent ID in full, including that one.

Client.transfer takes intentIDIsSensitive (default false). When it's set, submit logs the ID as … plus its last six base58 characters on "Submitting intent", the server-parameters lines and the error line, and logs it in full on "Intent submitted successfully", once it can no longer be spent. Every other intent (buy, sell, sends, withdrawals) logs exactly as before. The masking rule is IntentLogID, covered by IntentLogIDTests.

The caller that sets the flag, Session.payRequestShare, is in #1129, which isn't on main yet. It passes intentIDIsSensitive: true once both land.

Not changed: SensitiveKeyRedactor still doesn't redact intentId, so other payments keep full IDs. Nothing else on main logs a transfer's intent ID: the RPC layer has no body logging, and pollIntentMetadata isn't on the pay path.

…ttles

A payment request's payment_intent_id can be spent by anyone who learns it before the share is paid (paymentrequest_service.proto:192). TransactionService.submit logged every intent ID in full. A caller can now mark the ID as sensitive through transfer(intentIDIsSensitive:); submit then logs only its last six base58 characters before submitting and on failure, and the full ID once the intent succeeds. Other intents log as before.
@bmc08gt bmc08gt self-assigned this Oct 25, 2026
@bmc08gt
bmc08gt merged commit 0c57b37 into main Oct 25, 2026
4 checks passed
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.

1 participant