BlockchainCommons / GordianSeedTool-iOS

Cryptographic Seed Manager for iOS
Other
36 stars 8 forks source link

GST Can Get Into a Weird State if You QR Scan an Animated QR from the Main QR Tool #210

Closed shannona closed 5 months ago

shannona commented 5 months ago

This is not well replicable, but I've had a few different weird things happen when I played with it.

The inciting incident is using the main QR reader on the iPhone (not the one within GST) to read an animated QR. It tries to open it in Seed Tool and obviously it doesn't do anything useful, as it (I presume) only grabs a single frame.

One time it didn't show any error at all, but afterward I couldn't hit the QR button within GST until I restarted the App.

Another time it came up with the more expected Unrecognized Format, but then when I tried to read the animated QR from within GST, it went totally wacky, both increasing and decreasing the amount it thought it needed to read!

https://github.com/BlockchainCommons/GordianSeedTool-iOS/assets/1110886/192c09b8-2414-4133-bbf9-4aa954648d38

I suggest trying to replicate this by reading an animated QR from the main iPhone scanner, jumping into GST, and then after whatever failure trying to do so from within. I don't know if it's replicable, but I only decided to write it up after I hit a set weird condition.

wolfmcnally commented 5 months ago

This was a legit bug: the code paths followed by the app when a URL is injected from outside the app did not consider fountain code URs causing strange behavior.

shannona commented 5 months ago

Wow. Very clean. The couple of tests I tried opened up GST and then continued right along with the animated scan. Definitely not seeing the weird situations I did before.