hzrd149 / nostrudel

A sandbox for exploring nostr
https://nostrudel.ninja/
MIT License
126 stars 38 forks source link

Faulty parsing of image urls #123

Closed Giszmo closed 7 months ago

Giszmo commented 7 months ago

So I'm not 100% sure it's noStrudel's fault but I see a ton of url parts leak into bodies where people share images.

image

is how this event gets rendered in my noStrudel (Firefox 118):

{
  "content": "\nhttps://image.nostr.build/779c4fb7ac39a4ce9bd424b2314a77cb53768c6b3e1324951845dce0d5afd5c2.jpg#m=image%2Fjpeg&dim=1262x1280&blurhash=%7CcKn0kQ%2CaK-oM%7BtQNcoeNF_No%7ER%25M%7Ba%24WAWBaeaf.Tt3R-NLjER-jEW%3Da%7B%3FZR*oLxVbaofWVoIWCITSQjDkWWFr%3BW%3Fj%3Dj%5D9GnNbdWCbEW%3DoIbJoc9Ft7kDi%5Et7bIoeWBj%5BM%7CjEjYXTnha%7Da%24skWYt6WXazjrW%3Daxa_j%5Do2&x=e73229223f73c59ed8a7038c6fcd08a62c04b51e7019ee0a02810a6046c41f95",
  "created_at": 1705771660,
  "id": "86febec04ea43751d8effd4edd23af0a4ade2e530cdb26ed5f186dd80680a122",
  "kind": 1,
  "pubkey": "f728d9e6e7048358e70930f5ca64b097770d989ccd86854fe618eda9c8a38106",
  "sig": "b1fcfc1d2c67ea7ff7c9c35362fa812e7c744a5b1505f647b1889101e50e0e258590cf2ff4df2e38acf426d9fa946bec4460faf8e7ef7b149a921913f6cd27ac",
  "tags": [
    [
      "r",
      "https://image.nostr.build/779c4fb7ac39a4ce9bd424b2314a77cb53768c6b3e1324951845dce0d5afd5c2.jpg#m=image%2Fjpeg&dim=1262x1280&blurhash=%7CcKn0kQ%2CaK-oM%7BtQNcoeNF_No%7ER%25M%7Ba%24WAWBaeaf.Tt3R-NLjER-jEW%3Da%7B%3FZR*oLxVbaofWVoIWCITSQjDkWWFr%3BW%3Fj%3Dj%5D9GnNbdWCbEW%3DoIbJoc9Ft7kDi%5Et7bIoeWBj%5BM%7CjEjYXTnha%7Da%24skWYt6WXazjrW%3Daxa_j%5Do2&x=e73229223f73c59ed8a7038c6fcd08a62c04b51e7019ee0a02810a6046c41f95"
    ]
  ]
}

I suspect, noStrudel breaks the URL at "*".

hzrd149 commented 7 months ago

Released in v0.38.0