geewallet icon indicating copy to clipboard operation
geewallet copied to clipboard

Scanning some QR codes will crash the application

Open webwarrior-ws opened this issue 1 year ago • 5 comments

Steps to reproduce:

  1. Open GWallet Android app
  2. Navigate to Send page
  3. Click "scan" button
  4. Scan QR code that decodes to text "litecoin:ygfdty" (starts with "litecoin:" but has incorrect LTC address)

Current results: Application crashes

Expected results: An error is shown, but app keeps working.

The reason is that ParseAddressOrUrl function will raise an exception in that case. https://github.com/nblockchain/geewallet/blob/2857266c037357c8f8cde7c1a33aac47289647c1/src/GWallet.Backend/UtxoCoin/UtxoCoinAccount.fs#L614

webwarrior-ws avatar Apr 22 '24 11:04 webwarrior-ws

Please check the handbook on how to file bugs.

knocte avatar Apr 22 '24 11:04 knocte

Scan QR code that decodes to text that starts with "bitcoin:" or "litecoin:" but doesn't contain valid bitcoin/litecoin address

Give a specific example. The specific one that you have tested.

knocte avatar Apr 22 '24 11:04 knocte

Sample barcode: barcode_sample

webwarrior-ws avatar Apr 22 '24 11:04 webwarrior-ws

Sample barcode:

Please edit steps to reproduce to:

  • include the text that his barcode decodes to (in step 4).
  • change steps to be numbered, like it says in the handbook.

knocte avatar Apr 22 '24 11:04 knocte

Scan QR code that decodes to text "litecoin:ygfdty" (starts with "litecoin:" but has incorrect LTC address)

Let's investigate what happens in the case of scanning a bitcoin QR code (when in a Bitcoin's SendPage): does BitcoinUrlBuilder return an Address property that is null? Let's test with "bitcoin:ygfdty".

knocte avatar Apr 23 '24 02:04 knocte