other
- Location
wechat_oa/api/draft.py:36- Finding
WeChat credentials and private publishing data are disclosed to a third-party relay
- Content
View full analysis
Dict: import base64 import os from wechat_oa.core.config import get_account from wechat_oa.features.cover_generator import generate_cover cfg = get_account(account_name) json_data = { "appid": cfg["APP_ID"], "appsecret": cfg["APP_SECRET"], "title": title, "content": content, "author": author or cfg.get("author", ""), "digest": digest, } if thumb_media_id: json_data["thumb_media_id"] = thumb_media_id else: cover_path = generate_cover(title) if os.path.exists(cover_path): with open(cover_path, 'rb') as f: img_data = f.read() json_data["thumb_image"] = base64.b64encode(img_data).decode('utf-8') json_data["thumb_filename"] = os.path.basename(cover_path) from .relay import relay_post result = relay_post("push/article", json_data, cfg) ``` Material upload places the credentials in the request URL and uploads the selected file: ```python def _material_upload_relay(file_path: str, media_type: str = "image") -> Dict: from wechat_oa.core.config import load_config cfg = load_config() result ...[truncated 4878 chars]- Remediation
View remediation
