From 853f3d5082bf5b233acb2051f9b56b685784d8a2 Mon Sep 17 00:00:00 2001 From: ymq Date: Mon, 17 Aug 2026 15:28:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20llm=5Fbridge.=5Fdecrypt=5Fkey=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20unpassword=20=E5=8F=82=E6=95=B0=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=20+=20key=20=E9=BB=98=E8=AE=A4=E5=80=BC=E5=85=9C?= =?UTF-8?q?=E5=BA=95=EF=BC=8C=E6=AD=A3=E7=A1=AE=E8=A7=A3=E5=AF=86=20confid?= =?UTF-8?q?ential=5Ffields=20=E5=8A=A0=E5=AF=86=E7=9A=84=20api=5Fkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline_service/llm_bridge.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pipeline_service/llm_bridge.py b/pipeline_service/llm_bridge.py index 0e94db5..37124c7 100644 --- a/pipeline_service/llm_bridge.py +++ b/pipeline_service/llm_bridge.py @@ -24,8 +24,10 @@ def _decrypt_key(encrypted: str) -> str: from appPublic.rc4 import unpassword from appPublic.jsonConfig import getConfig config = getConfig() - key = config.password_key - return unpassword(key, encrypted) + # 与 ahserver.globalEnv.get_password_key() 一致:password_key 为空时用默认 key + key = config.password_key or 'QRIVSRHrthhwyjy176556332' + # unpassword(code, key):code=密文,key=密钥(之前参数顺序写反了) + return unpassword(encrypted, key) except Exception: return encrypted # already plaintext or decrypt failed