1
0
Fork 0
mirror of https://github.com/Luzifer/vault-totp.git synced 2024-12-22 22:01:19 +00:00

Fix: Some services provides lower-case base32 secrets

This commit is contained in:
Knut Ahlers 2017-01-03 15:10:00 +01:00
parent 786b2f51f8
commit 13b379ec1a
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -5,6 +5,7 @@ import (
"io/ioutil"
"log"
"os"
"strings"
"time"
"github.com/Luzifer/rconfig"
@ -122,7 +123,7 @@ func buildOutput(secret string) (string, error) {
// Output: "123456 (Valid 12s)", "123456 (Valid 1s)"
n := time.Now()
code, err := totp.GenerateCode(secret, n)
code, err := totp.GenerateCode(strings.ToUpper(secret), n)
if err != nil {
return "", err
}