记录微信首次登录修复上线及线上接口核验

这个提交包含在:
mac 于 2026-11-13 01:25:48 +08:00 提交
1 父节点 0f3f14522c
当前提交 1d3ad6f847
6 个文件已更改
+157 -11

没有与搜索条件相匹配的文件

+1 -1
查看文件
@@ -50,4 +50,4 @@ python3 Backend/deploy_wechat_login.py
前两项执行合成账号和 OAuth 的隔离测试,不加载生产配置;后一项仅审阅两个明确目标、SHA-256、挂载与权限。先按仓库约定完成源码提交、推送和回读,再加 `--apply --ssh-control <已认证连接>` 进行部署。脚本固定目标 SSH 主机和已确认的 NAS 原生路径,不接收或保存密码。写入前复核全部目标基线,每个覆盖文件均创建原目录分钟级旁路备份;使用原文件所有者通过原生 SSH 保留 UID/GID、权限和扩展属性,两个文件均暂存成功才替换,失败回滚已替换文件。部署报告保存每个相对路径、备份完整路径、摘要与原生元数据。回退沿用上节规则。若生产基线已变化,先重新比较,不能直接更新预期摘要来绕过保护。
此前会话目录与网络限制已在当前会话解除,无需修改 NAS 权限。真实未绑定用户扫码仍需实际验收。现状与部署结果见 [开发交接](../开发交接.md),证据见 [验证报告](../verification/WeChatLoginFix.json)。
2026-11-13 01:22 已完成两文件上线。67 项隔离检查、服务器 PHP 7.4.34 语法及8项实际 HTTPS 检查通过;拒绝/过期会话立即返回401,三个临时合成会话已清理。原生权限及扩展属性保持,旁路备份见 `verification/WeChatLoginDeployment.json`。此前目录与网络限制已解除,无需修改 NAS 权限。真实未绑定用户扫码仍需实际验收。现状与部署结果见 [开发交接](../开发交接.md),证据见 [验证报告](../verification/WeChatLoginFix.json)。
+15 -4
查看文件
@@ -9,6 +9,7 @@ from pathlib import Path
import shutil
import shlex
import subprocess
import time
from deploy import ROOT, NAS, MOUNT, sha, check_mount, write_json
@@ -195,14 +196,24 @@ def main():
result['target'] = str(NAS/relative)
if 'nativeBackup' in result:
result['backup'] = str(NAS/Path(result['nativeBackup']).relative_to('/vol1/1000/dayumedia/wwwroot/dayu_media'))
if outcome['ok']:
assert sha(NAS/relative) == result['sha256'], 'SMB/native content mismatch'
write_json(ROOT/'verification/WeChatLoginDeployment.json', dict(
report = dict(
checkedAt=datetime.datetime.now(datetime.timezone.utc).isoformat(), sourceCommit=commit,
localProject=str(ROOT/'Backend'), nasRoot=str(NAS), files=results,
nativeResult=outcome, liveScanVerified=False,
status='files deployed; fresh unbound-account scan still required' if outcome['ok'] else 'deployment failed'))
status='native deployment complete; SMB readback pending' if outcome['ok'] else 'deployment failed')
report_path = ROOT/'verification/WeChatLoginDeployment.json'
# Keep the native transaction evidence even if SMB serves a stale cache.
write_json(report_path, report)
assert outcome['ok'], json.dumps(outcome,ensure_ascii=False)
for result in results:
deadline = time.monotonic()+30
while sha(Path(result['target'])) != result['sha256']:
if time.monotonic() >= deadline:
raise RuntimeError('Native deployment passed; SMB readback remains stale: '+result['relativePath'])
time.sleep(1)
report['smbReadbackPassed'] = True
report['status'] = 'files deployed; fresh unbound-account scan still required'
write_json(report_path, report)
print(json.dumps(dict(deployed=len(results), files=results), ensure_ascii=False, indent=2))
finally:
def ignore_missing(function, path, exception):