google / google-authenticator

Open source version of Google Authenticator (except the Android app)
Apache License 2.0
5.18k stars 965 forks source link

When invalid QR code, application crashes #36

Closed ThomasHabets closed 9 years ago

ThomasHabets commented 9 years ago

Original issue 36 created by gindox on 2011-02-18T13:36:04.000Z:

What steps will reproduce the problem?

  1. Open the application or click scan account barrcode
  2. Present an invalid QR code
  3. Application Authenticator will crash

What is the expected output? What do you see instead? This QR code is invalid.

What version of the product are you using? On what operating system? Version 0.54

Please provide any additional information below.

ThomasHabets commented 9 years ago

Comment #1 originally posted by adhintz@google.com on 2011-02-26T23:21:18.000Z:

Could you please provide an example of an invalid QR code that crashes the app?

ThomasHabets commented 9 years ago

Comment #2 originally posted by gindox on 2011-02-27T00:00:57.000Z:

A QR code that has a content like "ftp://ftp.heanet.ie" or "http://www.google.ie" will result a pop-up error message: Error, Key not recognised

However, when a message like "this-is-not-a-valid-qr-code" is passed through QR code the application crashes.

I used QR generator from here: http://zxing.appspot.com/generator/

Version used: 0.54 Android version: 2.2

ThomasHabets commented 9 years ago

Comment #3 originally posted by adhintz@google.com on 2011-02-27T00:57:22.000Z:

Thanks for the clarification!

ThomasHabets commented 9 years ago

Comment #4 originally posted by adhintz@google.com on 2011-03-08T23:36:17.000Z:

I was not able to reproduce this. Here are the steps I took: 1) In the Authenticator app, Menu -> Scan a barcode 2) zxing barcode scanner opens and scan the barcode at http://chart.apis.google.com/chart?cht=qr&chs=350x350&chl=this-is-not-a-valid-qr-code 3) The dialog "Error, Cannot interpret QR code." is displayed.

I'm running 0.54 from the Market on a recent build of Android with Barcode Scanner zxing 3.53

ThomasHabets commented 9 years ago

Comment #5 originally posted by adhintz@google.com on 2011-03-08T23:37:16.000Z:

<empty>

ThomasHabets commented 9 years ago

Comment #6 originally posted by kpdjbolk@sharklasers.com on 2011-07-01T19:02:35.000Z:

The attached qrcode image crashes version 0.62 on android (marketplace current version) and it is impossible to restart, requiring a reinstall and deletion of existing data/keys.

This bug occurs every time for me even after uninstalling / reinstalling. My phone is android 2.2 - I'm assuming unless this bug doesn't replicate on other devices that it is an issue with the authenticator app.

ThomasHabets commented 9 years ago

Comment #7 originally posted by klyubin@google.com on 2011-07-04T11:00:57.000Z:

Thank you for the report! This particular issue is caused by an invalid character '1' in the "secret" parameter in the URL encoded in the QR-code.

We're working on a fix. For now, the workaround is to clear application's data (thus losing key material of all accounts configured in the application) or to downgrade to v0.54 (attached) which will not crash and will thus let you delete the "offending" account.

ThomasHabets commented 9 years ago

Comment #8 originally posted by kpdjbolk@sharklasers.com on 2011-07-04T12:07:19.000Z:

Glad to be of help. Discovered the issue while experimenting with the system. Thanks for quick response.

I look forward to a future update and will avoid testing with invalid keys for now.

Thanks for providing such a useful application.

ThomasHabets commented 9 years ago

Comment #9 originally posted by klyubin@google.com on 2011-07-28T00:20:50.000Z:

The issue has been fixed in v0.64 which is now in Market.