lnbits icon indicating copy to clipboard operation
lnbits copied to clipboard

LNURLp does not check the return value of webhook call

Open we-do-it-lu opened this issue 3 years ago • 4 comments

One can configure webhook URL to trigger when payment is made on LNURLp. The URL is called but the return code (expected 200 all being well) is not checked, which means that is the URL is erroneous or the server down it happens silently (the payment has not triggered what the user paid for).

we-do-it-lu avatar Jan 11 '22 16:01 we-do-it-lu

What should LNbits do if the target server is down?

fiatjaf avatar Jan 11 '22 18:01 fiatjaf

Propagate the code of the response from the server. If server not reachable -> 500 (mean there was a server-side error — think of something like the database server going down or perhaps running out of disk space, whatever).

we-do-it-lu avatar Jan 13 '22 08:01 we-do-it-lu

(No appropriate code is like passing hot potatoe without following up that all went well 🙏)

we-do-it-lu avatar Jan 13 '22 08:01 we-do-it-lu

Propagate to where? This is an asynchronous job. There will be no one to read.

But I thought we were storing at least the status code along with the payment.

fiatjaf avatar Jan 13 '22 09:01 fiatjaf

Closed for inactivity!

talvasconcelos avatar Oct 28 '22 10:10 talvasconcelos