Files
verify/shell/classic
admin 1dc2dd78dd
Docker Build / Build and Push Docker Image (push) Successful in 31s
Docker Build / Deploy to Server (push) Successful in 1s
fix(shell): 补齐 WinHTTP 的 WINHTTP_FLAG_SECURE,https api 的请求此前全部走明文
现象:应用配了 login_mode=card,加壳后的客户端仍然显示「账号 + 密码 + 注册」
两个 tab、没有卡密输入框、没有充值入口;应用名却显示正确。

根因:壳里所有 WinHttpOpenRequest 的 dwFlags 都传 0。对 https 的 api,
WinHTTP 会用明文 HTTP 去连 443 端口,服务端(Caddy)直接回
400 The plain HTTP request was sent to HTTPS port。

而 api_get_sibling 的成功判据是 ok = (total > 0),400 的 HTML 错误页
同样算「成功」,于是 FetchAppInfo 继续往下走,对 HTML 做 json_str 解析,
全部失败,各个配置项静默回落到默认值 —— g_loginMode 停在 account、
g_billing 读不到,界面就是默认的账号登录。因为静默,所以查不出错。

应用名显示正确是另一条路径:json_str(g_cfg, "name", ...) 从 .vfy 里的
cfg 读,跟 /info 无关,所以它好着,掩盖了 /info 整体失败。

实测对比(同一 URL,wine + WinHTTP):
  dwFlags=0        → status=400  <html>400 The plain HTTP request was sent to HTTPS port
  dwFlags=SECURE   → status=200  {"code":200,"data":{"allowed_login_types":["card"],...}}

修复:
- shell9_v6.cpp(DuiLib 全部 7 套皮肤,64/32 位)5 处 WinHttpOpenRequest
  补 https ? WINHTTP_FLAG_SECURE : 0
- classic shell5.cpp / shell6.cpp 的登录另外还有 port 写死 80 的问题,
  一并按 scheme 判断改成 443,并补 SECURE 标志
- 重编 shell64_dui.bin / shell32_dui.bin 并更新 embed assets
2026-11-29 08:49:42 +08:00
..