diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2018-01-16 12:03:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-16 12:03:31 -0500 |
commit | 2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7 (patch) | |
tree | e08ff912e1924c06939f314168c3362d6f1ec0de /vendor/github.com/dgryski/dgoogauth | |
parent | f5c8a71698d0a7a16c68be220e49fe64bfee7f5c (diff) | |
download | chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.tar.gz chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.tar.bz2 chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.zip |
Updated dependencies and added avct/uasurfer (#8089)
* Updated dependencies and added avct/uasurfer
* Added uasurfer to NOTICE.txt
Diffstat (limited to 'vendor/github.com/dgryski/dgoogauth')
-rw-r--r-- | vendor/github.com/dgryski/dgoogauth/googauth_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/dgryski/dgoogauth/googauth_test.go b/vendor/github.com/dgryski/dgoogauth/googauth_test.go index 031922c47..43f35d2c9 100644 --- a/vendor/github.com/dgryski/dgoogauth/googauth_test.go +++ b/vendor/github.com/dgryski/dgoogauth/googauth_test.go @@ -1,7 +1,7 @@ package dgoogauth import ( - "strconv" + "fmt" "testing" "time" ) @@ -199,11 +199,11 @@ func TestAuthenticate(t *testing.T) { t0 = int64(time.Now().Unix() / 30) } c := ComputeCode(otpconf.Secret, t0) + code := fmt.Sprintf("%06d", c) - invalid := c + 1 attempts = []attempt{ - {strconv.Itoa(invalid), false}, - {strconv.Itoa(c), true}, + {code + "1", false}, + {code, true}, } for _, a := range attempts { |