From 8b7c731fd6299a04891f818f92cf88a0de71850a Mon Sep 17 00:00:00 2001 From: goomadao <39483078+goomadao@users.noreply.github.com> Date: Wed, 12 Aug 2020 05:50:56 -0700 Subject: [PATCH] Fix: ssr broken (#895) --- component/ssr/protocol/auth_aes128_md5.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }