diff --git a/component/ssr/protocol/auth_aes128_md5.go b/component/ssr/protocol/auth_aes128_md5.go index 0740f0b3..fc0c41bf 100644 --- a/component/ssr/protocol/auth_aes128_md5.go +++ b/component/ssr/protocol/auth_aes128_md5.go @@ -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 }