Feat/btcpay support#167
Conversation
b4c2a8f to
43f2326
Compare
2aeae96 to
397d403
Compare
4f85e30 to
ff3d612
Compare
d05aff2 to
fdbba4a
Compare
3d5833b to
a74b714
Compare
|
Report: Payment Bypass via NFC Token Parameter Injection in BTCPay Integration Vulnerability Description: val urlBuilder = StringBuilder("${baseUrl()}/cashu/pay-invoice?token=$token")
if (!paymentId.isNullOrBlank()) {
urlBuilder.append("&invoiceId=$paymentId")
}
val request = Request.Builder()
.url(urlBuilder.toString())
// ...Because the When this spoofed token is submitted via NFC, the resulting URL becomes: The HTTP client (OkHttp) and the BTCPay server will treat everything after the In Proof of Concept (PoC):
Impact: Remediation: val url = baseUrl().toHttpUrlOrNull()?.newBuilder()
?.addPathSegments("cashu/pay-invoice")
?.addQueryParameter("token", token)
?.apply {
if (!paymentId.isNullOrBlank()) {
addQueryParameter("invoiceId", paymentId)
}
}
?.build() |
e644513 to
7da6e82
Compare
Implement NUT-18 token redemption via BTCPay POST endpoint. Add helpers in CashuPaymentHelper to parse NUT-18 transport and ID. Add redeemTokenToPostEndpoint to BtcPayPaymentService. Add unit tests for PaymentServiceFactory and BtcPaySettingsActivity.
mark btcpay invoices as expired when btcpay integration turned off
add failed status
2a9cc24 to
8aeb833
Compare
This PR adds support for BTCPayServer with Cashu plugin (optionally) installed.