some tests and major cleanup
This commit is contained in:
parent
8ef2a2547c
commit
16671b3406
30 changed files with 192057 additions and 202431 deletions
|
|
@ -30,6 +30,9 @@ func checkXsrf(xsrf string, secret []byte) bool {
|
|||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if len(t) != jwt.KeySize {
|
||||
return false
|
||||
}
|
||||
return subtle.ConstantTimeCompare(secret, xor(t[keySize:], t[:keySize])) == 1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue