fix(security): 安全加固 — analytics 权限校验 + HSTS/CSP 安全头 + SSE no-cache + SQL 参数化
- analytics batch() 添加 require_permission + 事件数上限 100 - main.rs 添加 HSTS/Content-Security-Policy/Permissions-Policy 安全头 - sse_handler SSE 响应添加 Cache-Control: no-store 防 token 泄漏 - action_inbox_service SQL 查询改为参数化,防注入 - wechat_handler 日志脱敏,不打印 appid/secret 长度 - dynamic_table sanitize_identifier 添加 63 字节限制
This commit is contained in:
@@ -37,8 +37,8 @@ where
|
||||
tracing::info!(
|
||||
code = %req.code,
|
||||
tenant_id = %state.default_tenant_id,
|
||||
appid_len = state.wechat_appid.len(),
|
||||
secret_len = state.wechat_secret.len(),
|
||||
has_appid = !state.wechat_appid.is_empty(),
|
||||
has_secret = !state.wechat_secret.is_empty(),
|
||||
"微信登录请求"
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user