Repository navigation
fix(transactions): mask a server-issued intent ID in logs until it settles - #1131
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A payment request's
payment_intent_idcan be used up by anyone who learns it before the share is paid (paymentrequest_service.proto:192), which blocks the real payment.TransactionService.submitlogged every intent ID in full, including that one.Client.transfertakesintentIDIsSensitive(defaultfalse). When it's set,submitlogs 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 isIntentLogID, covered byIntentLogIDTests.The caller that sets the flag,
Session.payRequestShare, is in #1129, which isn't onmainyet. It passesintentIDIsSensitive: trueonce both land.Not changed:
SensitiveKeyRedactorstill doesn't redactintentId, so other payments keep full IDs. Nothing else onmainlogs a transfer's intent ID: the RPC layer has no body logging, andpollIntentMetadataisn't on the pay path.