element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
Apache License 2.0
3.28k stars 678 forks source link

Certain messages cause the app to crash #8859

Open nahuhh opened 3 weeks ago

nahuhh commented 3 weeks ago

Steps to reproduce

Receive spam message

{
  "content": {
    "body": "🆓 CLAIM $SUPRA\n\n New 56th mission from the Supra Oracles project  ☄️\n\n🟣 Supra Oracles is a multi-chain oracle that allows you to quickly convert data between Web2 and Web3. Raised $47 million from Coinbase Ventures, Animoca Brands, Huobi, Hashed, etc. on ➡️ Twitter 230k+ subscribers.\n\n📖 What we do:\n\n1️⃣ Take a look at their website\n\n✅  claim-supra.xyz\n\n2️⃣ Pay for a subscription ($5)\n3️⃣ We are active on the platform",
    "external_url": "https://t.me/wownero/218097",
    "fi.mau.telegram.source": {
      "chat_id": 1353770282,
      "id": 218097,
      "peer_type": "channel",
      "space": 1353770282
    },
    "format": "org.matrix.custom.html",
    "formatted_body": "<img data-mx-emoticon data-mau-animated-emoji src=\"mxc://t2bot.io/350796501f17b10d0e3294cf9be3975029772fd41702382405395939328\" height=\"32\" width=\"32\" alt=\"🆓\" title=\"🆓\"/> <strong>CLAIM </strong><font color='#3771bb'><strong>$SUPRA</strong></font><strong><br/><br/></strong> New 56th mission from the Supra Oracles project  ☄️<br/><br/><img data-mx-emoticon data-mau-animated-emoji src=\"mxc://t2bot.io/9f5436f1d6f71d1887d48c5da7202b542df0f6e01796859685563793408\" height=\"32\" width=\"32\" alt=\"🟣\" title=\"🟣\"/> Supra Oracles is a multi-chain oracle that allows you to quickly convert data between Web2 and Web3. Raised $47 million from Coinbase Ventures, Animoca Brands, Huobi, Hashed, etc. on <img data-mx-emoticon data-mau-animated-emoji src=\"mxc://t2bot.io/3e06b0f23500a6b6b9eb27e1b7c6989375c3361b\" height=\"32\" width=\"32\" alt=\"➡️\" title=\"➡️\"/> Twitter 230k+ subscribers.<br/><br/><img data-mx-emoticon data-mau-animated-emoji src=\"mxc://t2bot.io/dd23781c45b2bd0485c5d272986de9e593612abd\" height=\"32\" width=\"32\" alt=\"📖\" title=\"📖\"/><strong> What</strong> we do:<strong><br/><br/></strong><img data-mx-emoticon data-mau-animated-emoji src=\"mxc://t2bot.io/c0b27b4738b89d68757d2d9fe111cd6f0b3fba8c\" height=\"32\" width=\"32\" alt=\"1️⃣\" title=\"1️⃣\"/><strong> Take a look at their</strong> website<br/><br/><img data-mx-emoticon data-mau-animated-emoji src=\"mxc://t2bot.io/edb5fed7054505a390524188689d150a689b3d65\" height=\"32\" width=\"32\" alt=\"✅\" title=\"✅\"/>  <a href='http://claim-supra.xyz'>claim-supra.xyz</a><br/><a href='https://supraoracles.com/blastoff?ref=352e9-87941'><strong><br/></strong></a><img data-mx-emoticon data-mau-animated-emoji src=\"mxc://t2bot.io/4c1d1e4a37ca7c8eb610a8620635ec6d107b925f\" height=\"32\" width=\"32\" alt=\"2️⃣\" title=\"2️⃣\"/><strong> Pay for a subscription ($5)<br/></strong><img data-mx-emoticon data-mau-animated-emoji src=\"mxc://t2bot.io/891feb6b64812106b147e8960f4716cdd30acef4\" height=\"32\" width=\"32\" alt=\"3️⃣\" title=\"3️⃣\"/><strong> We are active on the platform</strong>",
    "msgtype": "m.text"
  },
  "origin_server_ts": 1720057892000,
  "sender": "@telegram_1514471020:t2bot.io",
  "type": "m.room.message",
  "unsigned": {},
  "event_id": "$abkeLvU_CHdCjD3h6PyaSjfVSCyaEC0cPiSgfGh4uQE",
  "room_id": "!mzmDQgjgqNJMGyTtDm:wowne.ro"
}

Outcome

What did you expect?

App doesnt crash

What happened instead?

App crashes

Your phone model

Reproducible by all android users

Operating system version

Android 10+

Application version and app store

1.6.16 [40106162] (F-e3a87815)

Homeserver

monero.social, xmr.mx, matrix.org

Will you send logs?

No

Are you willing to provide a PR?

No