blixt-wallet icon indicating copy to clipboard operation
blixt-wallet copied to clipboard

Crawl website for icon when using lnurl-pay and lnurl-withdraw

Open hsjoberg opened this issue 4 years ago • 3 comments

When paying with lnurl-pay or withdrawing with lnurl-withdraw, we should make a GET request to the domain site, parse the HTML and look for a favicon, apple-touch-icon or a manifest.json for showing an icon in the transaction list. For normal lightning payments, we could also crawl if paying through the WebLN browser.

We need to store the image somehow, there are a couple of libs available. We probably need to do this manually as we need to be careful regarding with the Tor integration. https://github.com/tradle/react-native-image-store https://github.com/itinance/react-native-fs

Parsing HTML https://www.npmjs.com/package/fast-html-parser https://www.npmjs.com/package/react-native-html-parser

hsjoberg avatar Aug 11 '20 14:08 hsjoberg

This could be a security issue. Images as foot-in-door towards fully compromising the user's device is reoccurring every year.

sesam avatar Feb 28 '21 10:02 sesam

@sesam That is a very good point.

hsjoberg avatar Feb 28 '21 15:02 hsjoberg

https://icon.horse

hsjoberg avatar Sep 03 '21 15:09 hsjoberg