I've always thought of preimages as secrets that should only be revealed after payment, but given that a payment needs to be in route to update channel states, I can't easily imagine how it leads to stolen funds.
If you're revealing preimages, it means you are not securing preimages. You are exposing your payers to loss of funds, so by extension you're on the hook for that.
You also lose all ability to provide the user with proof of payment. You have to assume they made the payment to you. Software bugs exist and the funds can be stolen, so how are you going to check if a payment made it to you or not or if they lost funds or not when the payer already has the proof?
Browsing it again, there could also be something there with altering amounts and having it route through you, though I'm not sure if it would result in payee loss of funds. It might be uncharted territory since it's kind of a taboo thing to do.
Just to be clear, we are talking about revealing the pre image to the payee, right? Not the payer? At least, in the context of the PR where this originated
The payee is ultimately SN given that we're custodial. Rather than imagining someone sending your account money, imagine someone malicious funding their account and looking for a way to steal money.
This seems to imply that it isn't the payee who can lose funds - only the payer.
If we assume we have this payment route: Alice -> Bob -> Carol. Carol generates an invoice and reveals the preimage before Alice has sent the payment. If Bob somehow learns the preimage and Alice pays Carol through Bob, Bob can claim Alice's funds without passing along the payment to Carol. Carol will assume Alice never paid.
It seems like there's no risk to Carol and there's no harm in telling Alice the preimage ahead of time, but it is important Bob does not see it ahead of time.
Right, basically the payment can be intercepted before the intended recipient gets it. So the payer would need to pay another invoice once the payee asserts they didn’t receive the funds from the original invoice
I recall this happening to Saifedean in Austin when he was selling books reusing a printed out bolt11 invoice. People were paying him but he didn't end up receiving the money iirc.