XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.48k stars 1.45k forks source link

NFT issuer is inadvertently creating a trustline due to third-party transactions(Version: 2.1.0) #4925

Closed tequdev closed 2 weeks ago

tequdev commented 4 months ago

Issue Description

Since the NFTokenAcceptOffer does not check the trust line that the issuer receives as a transfer fee in the NFTokenAcceptOffer, if the issuer deletes the trust line after NFTokenCreateOffer, the trust line is created for the issuer by the NFTokenAcceptOffer.

Steps to Reproduce

  1. Issuer has Trustline (ie: USD)
  2. Mint NFToken with transfer fee
  3. Transfer NFToken to Alice.
  4. Alice create NFTokenOffer to bob with 10 USD
  5. Issuer delete USD Trustline
  6. Accept NFTokenOffer

Expected Result

NFTokenAcceptOffer transaction fails with terNO_LINE

Actual Result

NFTokenAcceptOffer transaction succeeds and a trustline is created for the issuer.

Environment

rippled 2.1.0

Supporting Files

https://gist.github.com/tequdev/f5cfd3f3cfbfcf4a22205052962e6cfe

ximinez commented 4 months ago

Do you have any example transaction(s)?

tequdev commented 4 months ago

Do you have any example transaction(s)?

You can find gist code in the supporting files.

ximinez commented 4 months ago

Yes, that's the code you used to generate transaction, but what I'm asking for is transaction IDs that have already been validated, and which network they're on.

tequdev commented 4 months ago

This NFTokenAcceptOffer transaction creates a trustline for NFT's Issuer account.

https://testnet.xrpl.org/transactions/DB9EC35BEC75D314CAB5D4ADBF676C0ACE4EF03EAA83268921C377CD0ACF4934/detailed

NFToken issuer account https://testnet.xrpl.org/accounts/rL4qyVGJLjch4863okbM9brrR5EhFrHZ61

ximinez commented 4 months ago

Yep. Confirmed that this is a legitimate issue.