Fix: ssr broken (#895)

This commit is contained in:
goomadao 2020-08-12 05:50:56 -07:00 committed by GitHub
parent 0b7918de9c
commit 8b7c731fd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,8 +92,8 @@ func (a *authAES128) Decode(b []byte) ([]byte, int, error) {
break
}
h = a.hmac(key, b[:bSize-4])
if !bytes.Equal(h[:4], b[bSize-4:]) {
h = a.hmac(key, b[:length-4])
if !bytes.Equal(h[:4], b[length-4:length]) {
return nil, 0, errAuthAES128IncorrectChecksum
}