MostroP2P / mostro

Lightning Network peer-to-peer exchange platform on Nostr
https://mostro.network
MIT License
191 stars 32 forks source link

Bug with cooperative cancellations #360

Closed Catrya closed 2 months ago

Catrya commented 2 months ago

Two random users can cancel an order that is not theirs without the buyer and seller being able to do anything.

Users: Seller and Buyer C: random user 1 D: random user 2

When the order is in Active status, C sends cancel action to mostro, mostro returns: CooperativeCancelInitiatedByYou and to the Buyer (always to the buyer): CooperativeCancelInitiatedByPeer. Mostro does not send any new action to the Seller.

Then D sends the cancel action and the order is cancelled, it goes to cooperatively-canceled status, mostro sends CooperativeCancelAccepted to D and the buyer. The Seller and C does not receive any message from mostro.