{"action":"created","issue":{"url":"https://api.github.com/repos/wstrange/GoogleAuth/issues/37","repository_url":"https://api.github.com/repos/wstrange/GoogleAuth","labels_url":"https://api.github.com/repos/wstrange/GoogleAuth/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/wstrange/GoogleAuth/issues/37/comments","events_url":"https://api.github.com/repos/wstrange/GoogleAuth/issues/37/events","html_url":"https://github.com/wstrange/GoogleAuth/issues/37","id":154228819,"number":37,"title":"Verification codes starting with 0 handled incorrectly","user":{"login":"mpwaldhorst","id":13185130,"avatar_url":"https://avatars.githubusercontent.com/u/13185130?v=3","gravatar_id":"","url":"https://api.github.com/users/mpwaldhorst","html_url":"https://github.com/mpwaldhorst","followers_url":"https://api.github.com/users/mpwaldhorst/followers","following_url":"https://api.github.com/users/mpwaldhorst/following{/other_user}","gists_url":"https://api.github.com/users/mpwaldhorst/gists{/gist_id}","starred_url":"https://api.github.com/users/mpwaldhorst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpwaldhorst/subscriptions","organizations_url":"https://api.github.com/users/mpwaldhorst/orgs","repos_url":"https://api.github.com/users/mpwaldhorst/repos","events_url":"https://api.github.com/users/mpwaldhorst/events{/privacy}","received_events_url":"https://api.github.com/users/mpwaldhorst/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-11T12:14:44Z","updated_at":"2016-05-11T13:00:10Z","closed_at":"2016-05-11T12:25:00Z","body":"Due to the usage of integers in the code comparison of a hash starting with a zero is handled incorrectly.\r\n\r\nThis causes the 0 at the start of the verification code to be truncated and therefore not used in the comparison.\r\n\r\nTo summarize we have the following situation\r\nExpected verification code = 012345\r\nEntered verification code = 12345\r\nResult = valid verification code\r\nExpected result = verification code is invalid\r\n\r\nThe RFC returns strings when generating the totp code."},"comment":{"url":"https://api.github.com/repos/wstrange/GoogleAuth/issues/comments/218451679","html_url":"https://github.com/wstrange/GoogleAuth/issues/37#issuecomment-218451679","issue_url":"https://api.github.com/repos/wstrange/GoogleAuth/issues/37","id":218451679,"user":{"login":"emcrisostomo","id":6645610,"avatar_url":"https://avatars.githubusercontent.com/u/6645610?v=3","gravatar_id":"","url":"https://api.github.com/users/emcrisostomo","html_url":"https://github.com/emcrisostomo","followers_url":"https://api.github.com/users/emcrisostomo/followers","following_url":"https://api.github.com/users/emcrisostomo/following{/other_user}","gists_url":"https://api.github.com/users/emcrisostomo/gists{/gist_id}","starred_url":"https://api.github.com/users/emcrisostomo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emcrisostomo/subscriptions","organizations_url":"https://api.github.com/users/emcrisostomo/orgs","repos_url":"https://api.github.com/users/emcrisostomo/repos","events_url":"https://api.github.com/users/emcrisostomo/events{/privacy}","received_events_url":"https://api.github.com/users/emcrisostomo/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T13:00:10Z","updated_at":"2016-05-11T13:00:10Z","body":"Thanks for the feedback: it's always good.  When I decided to use an integer representation I expected it not to be intuitive for some.  But at the end I convinced myself it was just easier to deal with integers than with strings and implemented it like this.\r\n\r\nThanks!"}}