Closed olfek closed 2 months ago
https://github.com/Authenticator-Extension/Authenticator/blob/284facae9aea0fe677c9426e2ad81e51c4b0ab65/src/models/key-utilities.ts#L67
I found an actual bug this time. @mymindstorm
Consider this example:
Input:
base32tohex("KK======")
Where KK is 01010 01010
KK
01010 01010
Output in hex: 52 (01010 010)
52
01010 010
The last 2 bits 10 have been lost.
10
The code to remove padding is removing too much.
KK is not a valid sequence of octets, my bad 😅
https://github.com/Authenticator-Extension/Authenticator/blob/284facae9aea0fe677c9426e2ad81e51c4b0ab65/src/models/key-utilities.ts#L67
I found an actual bug this time. @mymindstorm
Consider this example:
Input:
Where
KK
is01010 01010
Output in hex:
52
(01010 010
)The last 2 bits
10
have been lost.The code to remove padding is removing too much.