diff --git a/woa/init.py b/woa/init.py index 9939c18..9d52495 100644 --- a/woa/init.py +++ b/woa/init.py @@ -37,8 +37,8 @@ class WOAHandler: self.aes_key = None if encoding_aes_key: # 微信的 AES Key 是 base64 编码的 32 字节字符串 - self.aes_key = base64.b64decode(encoding_aes_key + "=") - self.aes_key = None + self.aes_key = base64.b64decode(encoding_aes_key) + debug(f'{self.app_id=}::{self.token=}::{encoding_aes_key=}::{len(encoding_aes_key)=}') self.media_manager = WeChatMediaManager(self.app_id, self.secret) def _check_signature(self, signature: str, timestamp: str, nonce: str) -> bool: