OTP Translation error #14

Closed
klali opened this Issue Mar 28, 2013 · 5 comments

Projects

None yet

2 participants

@klali
klali commented Mar 28, 2013

Hello,

Sometimes the translation algorithm makes errors, for example: vvbtbtndhtlfguefgluvbdcetnitidgkvfkbicevgcin can be decoded into both vvbfbfjghfuetiketuivbgckfjlflgtnvenblckvtclj and vvbtbtndhtlfguefgluvbdcetnitidgkvfkbicevgcin.

Maybe it would be better to prefer the one that matches the original instead of just taking the first?

/klas

@Kami
Owner
Kami commented Mar 28, 2013

Thanks.

I'll dig in and try to figure out what is the best way to do in cases like this (picking the matching one or picking the first one).

@Kami Kami added a commit that referenced this issue Mar 30, 2013
@Kami If there are multiple interpretations for a given OTP, first try to f…
…ind the one

which matches the input OTP. If the one is found, use the input OTP, otherwise
use last of the available interpretations.

Reported by Klas Lindfors, part of #14.
d02510a
@Kami
Owner
Kami commented Mar 30, 2013

I've pushed a branch which should improve this behavior - #15.

Can you please have a look / review it?

Thanks

@klali
klali commented Apr 2, 2013

It looks good to me (as in it works as I expect it to..) =)

/klas

@Kami
Owner
Kami commented Apr 2, 2013

@klali Thanks, I've merged it into master.

I will work on creating a new release and publish it on PyPi later today.

@Kami
Owner
Kami commented Apr 3, 2013

New version (1.6.2) with this change has been published to PyPi - https://pypi.python.org/pypi/yubico/1.6.2

@Kami Kami closed this Apr 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment