Skip to content

Commit a0a9903

Browse files
committed
Fix leak of invoice for sender
1 parent b08f074 commit a0a9903

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

api/resolvers/wallet.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -767,10 +767,8 @@ const resolvers = {
767767
}
768768
}
769769

770-
if (invoice) {
771-
const inv = await models.invoice.findUnique({ where: { id: invoice.id } })
772-
return await logContextFromBolt11(inv.bolt11)
773-
}
770+
// XXX never return invoice as context because it might leak sensitive sender details
771+
// if (invoice) { ... }
774772

775773
return context
776774
}

worker/paidAction.js

+1
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ export async function paidActionCanceling ({ data: { invoiceId, ...args }, model
443443
const decoded = await parsePaymentRequest({ request: bolt11 })
444444
logger.info(
445445
`invoice for ${formatSats(msatsToSats(decoded.mtokens))} canceled by payer`, {
446+
bolt11,
446447
invoiceId: transitionedInvoice.id
447448
})
448449
}

0 commit comments

Comments
 (0)