@shgroup/dsh-serenity-hooks 1.24.7 → 1.24.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-serenity-hooks",
3
- "version": "1.24.7",
3
+ "version": "1.24.8",
4
4
  "main": "lib/index.js",
5
5
  "description": "宁静号 ACC harness(Native Cordis 插件):真实 DSH 工具 cc_fs/session/acc_msm/eap/neat/cce/handyman/session_rebuild + 拦截缝机械约束(safe-mode/路径守卫)+ 高级设定面板(双端口网关/账号管理)。适配 DSH 公开版(0.1.0-rc,deepseek-ai/deepseek-harness)。",
6
6
  "engines": {
package/lib/index.js CHANGED
@@ -8457,9 +8457,9 @@ function startGateway(config, getAccounts) {
8457
8457
  const cookieCsrf = cookieValue(req.headers.cookie, "serenity_csrf");
8458
8458
  const formCsrf = csrfFromRequest(req, params);
8459
8459
  if (cookieCsrf === void 0 || formCsrf === null || !safeEqual(cookieCsrf, formCsrf)) {
8460
- console.warn(`[serenity-hooks] 登录拒绝(CSRF 校验失败):user=${user} ip=${remote}`);
8460
+ console.warn(`[serenity-hooks] 登录拒绝(CSRF 校验失败):user=${user} ip=${remote} cookieSecure=${cookieSecure ? "on" : "off"} cookieCsrf=${cookieCsrf === void 0 ? "missing" : "present"} formCsrf=${formCsrf === null ? "missing" : "present"}`);
8461
8461
  res.writeHead(403, { "content-type": "text/html; charset=utf-8" });
8462
- res.end(loginPageHtml("会话校验失败,请刷新页面重试"));
8462
+ res.end(loginPageHtml("会话校验失败,请刷新页面重试" + (cookieSecure ? "(若仍失败:设置面板关闭 Secure Cookie——明文 HTTP 下必须关闭)" : "")));
8463
8463
  return;
8464
8464
  }
8465
8465
  const lockedRemaining = accountLockRemaining(user);
@@ -8503,7 +8503,7 @@ function startGateway(config, getAccounts) {
8503
8503
  const csrf = newCsrfToken();
8504
8504
  res.writeHead(200, {
8505
8505
  "content-type": "text/html; charset=utf-8",
8506
- "set-cookie": `serenity_csrf=${csrf}; HttpOnly; SameSite=Strict; Path=/${cookieSecure ? "; Secure" : ""}`
8506
+ "set-cookie": `serenity_csrf=${csrf}; HttpOnly; SameSite=Strict; Path=/`
8507
8507
  });
8508
8508
  res.end(loginPageHtml("", csrf));
8509
8509
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.24.7",
3
+ "version": "1.24.8",
4
4
  "description": "宁静号 ACC harness — Native Cordis 插件(DeepSeek Harness 运行时)。真实 DSH 工具注册(cc_fs/session/acc_msm 等 9 工具)+ 拦截缝机械约束(safe-mode/路径守卫/会话落盘)+ 系统提示词注入(ACC/CCE/Constraints/SKILL/Session 五块)。适配 DSH 公开版(deepseek-ai/deepseek-harness 0.1.0-rc)。",
5
5
  "license": "MIT",
6
6
  "repository": {